projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
16e0558
)
[viki] Make uploader field optional (#1813)
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 25 Nov 2013 01:02:34 +0000
(
02:02
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 25 Nov 2013 01:02:34 +0000
(
02:02
+0100)
youtube_dl/extractor/viki.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/viki.py
b/youtube_dl/extractor/viki.py
index 7b3a58de8ed9bcd3162a5d62322f5ee757debef7..cd986a74968e2e08de1ca0d15a14eb30cdcd02dd 100644
(file)
--- 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)
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,
rating_str = self._html_search_regex(
r'<strong>Rating: </strong>\s*([^<]*)<', webpage,