aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/democracynow.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-10-31 22:21:52 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-10-31 22:21:52 +0800
commit78d7ee19dc417b16b26fe2fa1101124866727a85 (patch)
tree693f8548d7ebd5c3b6d6ff07b8e04ae17558bb2b /youtube_dl/extractor/democracynow.py
parent33a513faf716e5d4a170da50d6fde541817dca09 (diff)
downloadyoutube-dl-78d7ee19dc417b16b26fe2fa1101124866727a85.zip
youtube-dl-78d7ee19dc417b16b26fe2fa1101124866727a85.tar.gz
youtube-dl-78d7ee19dc417b16b26fe2fa1101124866727a85.tar.bz2
[democracynow] Fix _TESTS
Diffstat (limited to 'youtube_dl/extractor/democracynow.py')
-rw-r--r--youtube_dl/extractor/democracynow.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/democracynow.py b/youtube_dl/extractor/democracynow.py
index 973bb43..05cfc75 100644
--- a/youtube_dl/extractor/democracynow.py
+++ b/youtube_dl/extractor/democracynow.py
@@ -36,10 +36,9 @@ class DemocracynowIE(InfoExtractor):
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 @@ class DemocracynowIE(InfoExtractor):
'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