aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-11-25 02:02:34 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-11-25 02:02:34 +0100
commit1fb2bcbbf748e07d05f98110cc27d440506a9b77 (patch)
tree53cd26f7dd2ebdf2657cb3fa61ef86318e689128 /youtube_dl
parent16e055849ebfa5a942aef4411728b36bf53ebaa3 (diff)
[viki] Make uploader field optional (#1813)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/viki.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/viki.py b/youtube_dl/extractor/viki.py
index 7b3a58de8..cd986a749 100644
--- a/youtube_dl/extractor/viki.py
+++ b/youtube_dl/extractor/viki.py
@@ -34,11 +34,12 @@ class VikiIE(SubtitlesInfoExtractor):
description = self._og_search_description(webpage)
thumbnail = self._og_search_thumbnail(webpage)
- uploader = self._html_search_regex(
- r'<strong>Broadcast Network: </strong>\s*([^<]*)<', webpage,
- u'uploader')
- if uploader is not None:
- uploader = uploader.strip()
+ uploader_m = re.search(
+ r'<strong>Broadcast Network: </strong>\s*([^<]*)<', webpage)
+ if uploader_m is None:
+ uploader = None
+ else:
+ uploader = uploader.group(1).strip()
rating_str = self._html_search_regex(
r'<strong>Rating: </strong>\s*([^<]*)<', webpage,