aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-10-22 22:30:06 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-10-22 22:30:06 +0200
commit7853cc5ae1f9068f3bdf59ce959cb70645b9bc20 (patch)
tree82f0855ff96d3027c2026d2460a2a6c14d0fa6cc /youtube_dl/extractor/youtube.py
parent586a91b67f6fe7254beefc3831b4e4649f84f0ce (diff)
parentb028e96144a2bf1ba84dd6d11f1cc13a2928c438 (diff)
Merge remote-tracking branch 'origin/master'
Conflicts: youtube_dl/YoutubeDL.py
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index fb7c42830..a88cba2b4 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1150,7 +1150,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
list_page = self._download_webpage(list_url, video_id)
caption_list = xml.etree.ElementTree.fromstring(list_page.encode('utf-8'))
original_lang_node = caption_list.find('track')
- if not original_lang_node or original_lang_node.attrib.get('kind') != 'asr' :
+ if original_lang_node is None or original_lang_node.attrib.get('kind') != 'asr' :
self._downloader.report_warning(u'Video doesn\'t have automatic captions')
return {}
original_lang = original_lang_node.attrib['lang_code']