1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-27 17:26:51 +01:00

[mdr] Fix extraction and update tests

It's strange that the date is changed. Anyway, new data matches what the
webpage says.
This commit is contained in:
Yen Chi Hsuan 2016-04-16 21:57:28 +08:00
parent 9154c87fc4
commit 5e5c30c3fd
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30

View File

@ -49,8 +49,8 @@ class MDRIE(InfoExtractor):
'ext': 'mp4', 'ext': 'mp4',
'title': 'Beutolomäus und der geheime Weihnachtswunsch', 'title': 'Beutolomäus und der geheime Weihnachtswunsch',
'description': 'md5:b69d32d7b2c55cbe86945ab309d39bbd', 'description': 'md5:b69d32d7b2c55cbe86945ab309d39bbd',
'timestamp': 1419047100, 'timestamp': 1450950000,
'upload_date': '20141220', 'upload_date': '20151224',
'duration': 4628, 'duration': 4628,
'uploader': 'KIKA', 'uploader': 'KIKA',
}, },
@ -71,8 +71,8 @@ class MDRIE(InfoExtractor):
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
data_url = self._search_regex( data_url = self._search_regex(
r'(?:dataURL|playerXml(?:["\'])?)\s*:\s*(["\'])(?P<url>\\?/.+/(?:video|audio)-?[0-9]+-avCustom\.xml)\1', r'(?:dataURL|playerXml(?:["\'])?)\s*:\s*(["\'])(?P<url>.+/(?:video|audio)-?[0-9]+-avCustom\.xml)\1',
webpage, 'data url', default=None, group='url').replace('\/', '/') webpage, 'data url', group='url').replace('\/', '/')
doc = self._download_xml( doc = self._download_xml(
compat_urlparse.urljoin(url, data_url), video_id) compat_urlparse.urljoin(url, data_url), video_id)