[democracynow] Fix _TESTS

This commit is contained in:
Yen Chi Hsuan 2015-10-31 22:21:52 +08:00
parent 33a513faf7
commit 78d7ee19dc

View file

@ -36,10 +36,9 @@ def _real_extract(self, url):
if display_id == '':
display_id = 'home'
webpage = self._download_webpage(url, display_id)
re_desc = re.search(r'<meta property=.og:description. content=(["\'])(.+?)\1', webpage, re.DOTALL)
description = re_desc.group(2) if re_desc else ''
description = self._og_search_description(webpage)
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)
video_id = None
formats = []
@ -56,7 +55,7 @@ def _real_extract(self, url):
'ext': ext,
'url': url,
}]
for key in ('file', 'audio'):
for key in ('file', 'audio', 'video'):
url = js.get(key, '')
if url == '' or url is None:
continue