aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-17 02:49:54 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-17 02:49:56 +0100
commit46374a56b214cae9f66ef3c01cf3d62a71544030 (patch)
treed822418061be40952f30c181f1738e24959e6cd9 /youtube_dl/extractor/youtube.py
parentec98946ef9ae19f5218ac66d72d61883709982ca (diff)
[youtube] Do not warn for videos with allow_rating=0
This fixes #1982 Test video: http://www.youtube.com/watch?v=gi2uH3YxohU
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index a68a214ca..c860eedda 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1361,7 +1361,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
video_description = u''
def _extract_count(klass):
- count = self._search_regex(r'class="%s">([\d,]+)</span>' % re.escape(klass), video_webpage, klass, fatal=False)
+ count = self._search_regex(
+ r'class="%s">([\d,]+)</span>' % re.escape(klass),
+ video_webpage, klass, default=None)
if count is not None:
return int(count.replace(',', ''))
return None