mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-23 02:32:16 +00:00
[democracynow] Fix _TESTS
This commit is contained in:
parent
33a513faf7
commit
78d7ee19dc
1 changed files with 3 additions and 4 deletions
|
@ -36,10 +36,9 @@ class DemocracynowIE(InfoExtractor):
|
||||||
if display_id == '':
|
if display_id == '':
|
||||||
display_id = 'home'
|
display_id = 'home'
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
re_desc = re.search(r'<meta property=.og:description. content=(["\'])(.+?)\1', webpage, re.DOTALL)
|
description = self._og_search_description(webpage)
|
||||||
description = re_desc.group(2) if re_desc else ''
|
|
||||||
|
|
||||||
jstr = self._search_regex(r'({.+?"related_video_xml".+?})', webpage, 'json', default=None)
|
jstr = self._search_regex(r'<script[^>]+type="text/json"[^>]*>\s*({[^>]+})', webpage, 'json')
|
||||||
js = self._parse_json(jstr, display_id)
|
js = self._parse_json(jstr, display_id)
|
||||||
video_id = None
|
video_id = None
|
||||||
formats = []
|
formats = []
|
||||||
|
@ -56,7 +55,7 @@ class DemocracynowIE(InfoExtractor):
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
'url': url,
|
'url': url,
|
||||||
}]
|
}]
|
||||||
for key in ('file', 'audio'):
|
for key in ('file', 'audio', 'video'):
|
||||||
url = js.get(key, '')
|
url = js.get(key, '')
|
||||||
if url == '' or url is None:
|
if url == '' or url is None:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue