0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-30 03:33:02 +00:00

[daum.net] Move the request to ClipInfoXml.do

To reduce the number of wasted requests
This commit is contained in:
Yen Chi Hsuan 2016-01-30 16:23:37 +08:00
parent 874e05975b
commit 06ffa33485

View file

@ -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 @@ def _real_extract(self, url):
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']