mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-09 22:39:32 +01:00
[daum] Get the video page from a canonical url to extract the full id (fixes #1373) and extract description.
This commit is contained in:
parent
085bea4513
commit
9363169b67
@ -18,6 +18,7 @@ class DaumIE(InfoExtractor):
|
|||||||
u'file': u'52554690.mp4',
|
u'file': u'52554690.mp4',
|
||||||
u'info_dict': {
|
u'info_dict': {
|
||||||
u'title': u'DOTA 2GETHER 시즌2 6회 - 2부',
|
u'title': u'DOTA 2GETHER 시즌2 6회 - 2부',
|
||||||
|
u'description': u'DOTA 2GETHER 시즌2 6회 - 2부',
|
||||||
u'upload_date': u'20130831',
|
u'upload_date': u'20130831',
|
||||||
u'duration': 3868,
|
u'duration': 3868,
|
||||||
},
|
},
|
||||||
@ -26,7 +27,8 @@ class DaumIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
video_id = mobj.group(1)
|
video_id = mobj.group(1)
|
||||||
webpage = self._download_webpage(url, video_id)
|
canonical_url = 'http://tvpot.daum.net/v/%s' % video_id
|
||||||
|
webpage = self._download_webpage(canonical_url, video_id)
|
||||||
full_id = self._search_regex(r'<link rel="video_src" href=".+?vid=(.+?)"',
|
full_id = self._search_regex(r'<link rel="video_src" href=".+?vid=(.+?)"',
|
||||||
webpage, u'full id')
|
webpage, u'full id')
|
||||||
query = compat_urllib_parse.urlencode({'vid': full_id})
|
query = compat_urllib_parse.urlencode({'vid': full_id})
|
||||||
@ -63,6 +65,7 @@ def _real_extract(self, url):
|
|||||||
'title': info.find('TITLE').text,
|
'title': info.find('TITLE').text,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'thumbnail': self._og_search_thumbnail(webpage),
|
'thumbnail': self._og_search_thumbnail(webpage),
|
||||||
|
'description': info.find('CONTENTS').text,
|
||||||
'duration': int(info.find('DURATION').text),
|
'duration': int(info.find('DURATION').text),
|
||||||
'upload_date': info.find('REGDTTM').text[:8],
|
'upload_date': info.find('REGDTTM').text[:8],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user