mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 20:55:52 +01:00
[washingtonpost] Modernize and correct test case
This commit is contained in:
parent
e9a537774d
commit
99673f04bc
@ -10,14 +10,14 @@
|
|||||||
|
|
||||||
|
|
||||||
class WashingtonPostIE(InfoExtractor):
|
class WashingtonPostIE(InfoExtractor):
|
||||||
_VALID_URL = r'^https?://(?:www\.)?washingtonpost\.com/.*?/(?P<id>[^/]+)/(?:$|[?#])'
|
_VALID_URL = r'https?://(?:www\.)?washingtonpost\.com/.*?/(?P<id>[^/]+)/(?:$|[?#])'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'http://www.washingtonpost.com/sf/national/2014/03/22/sinkhole-of-bureaucracy/',
|
'url': 'http://www.washingtonpost.com/sf/national/2014/03/22/sinkhole-of-bureaucracy/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'title': 'Sinkhole of bureaucracy',
|
'title': 'Sinkhole of bureaucracy',
|
||||||
},
|
},
|
||||||
'playlist': [{
|
'playlist': [{
|
||||||
'md5': 'c3f4b4922ffa259243f68e928db2db8c',
|
'md5': '79132cc09ec5309fa590ae46e4cc31bc',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'fc433c38-b146-11e3-b8b3-44b1d1cd4c1f',
|
'id': 'fc433c38-b146-11e3-b8b3-44b1d1cd4c1f',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
@ -29,7 +29,7 @@ class WashingtonPostIE(InfoExtractor):
|
|||||||
'upload_date': '20140322',
|
'upload_date': '20140322',
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'md5': 'f645a07652c2950cd9134bb852c5f5eb',
|
'md5': 'e1d5734c06865cc504ad99dc2de0d443',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '41255e28-b14a-11e3-b8b3-44b1d1cd4c1f',
|
'id': '41255e28-b14a-11e3-b8b3-44b1d1cd4c1f',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
@ -44,10 +44,9 @@ class WashingtonPostIE(InfoExtractor):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
page_id = self._match_id(url)
|
||||||
page_id = mobj.group('id')
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, page_id)
|
webpage = self._download_webpage(url, page_id)
|
||||||
|
|
||||||
title = self._og_search_title(webpage)
|
title = self._og_search_title(webpage)
|
||||||
uuids = re.findall(r'data-video-uuid="([^"]+)"', webpage)
|
uuids = re.findall(r'data-video-uuid="([^"]+)"', webpage)
|
||||||
entries = []
|
entries = []
|
||||||
|
Loading…
Reference in New Issue
Block a user