diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-01-30 16:23:37 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-01-30 16:23:37 +0800 |
commit | 06ffa3348590f9aa6ddca7ca8f78424c49314560 (patch) | |
tree | 00b13e92908c341698ca10b24a740364d288f15b /youtube_dl/extractor/daum.py | |
parent | 874e05975b9dde433dc633f3060c3b9013775343 (diff) |
[daum.net] Move the request to ClipInfoXml.do
To reduce the number of wasted requests
Diffstat (limited to 'youtube_dl/extractor/daum.py')
-rw-r--r-- | youtube_dl/extractor/daum.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/daum.py b/youtube_dl/extractor/daum.py index 567abdc39..543eb5c3a 100644 --- a/youtube_dl/extractor/daum.py +++ b/youtube_dl/extractor/daum.py @@ -49,9 +49,6 @@ class DaumIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) query = compat_urllib_parse.urlencode({'vid': video_id}) - info = self._download_xml( - 'http://tvpot.daum.net/clip/ClipInfoXml.do?' + query, video_id, - 'Downloading video info') movie_data = self._download_json( 'http://videofarm.daum.net/controller/api/closed/v1_2/IntegratedMovieData.json?' + query, video_id, 'Downloading video formats info') @@ -60,6 +57,10 @@ class DaumIE(InfoExtractor): if not movie_data.get('output_list', {}).get('output_list') and re.match(r'^\d+$', video_id): return self.url_result('http://tvpot.daum.net/clip/ClipView.do?clipid=%s' % video_id) + info = self._download_xml( + 'http://tvpot.daum.net/clip/ClipInfoXml.do?' + query, video_id, + 'Downloading video info') + formats = [] for format_el in movie_data['output_list']['output_list']: profile = format_el['profile'] |