0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

[viki] Make uploader field optional (#1813)

This commit is contained in:
Philipp Hagemeister 2013-11-25 02:02:34 +01:00
parent 16e055849e
commit 1fb2bcbbf7

View file

@ -34,11 +34,12 @@ def _real_extract(self, url):
description = self._og_search_description(webpage) description = self._og_search_description(webpage)
thumbnail = self._og_search_thumbnail(webpage) thumbnail = self._og_search_thumbnail(webpage)
uploader = self._html_search_regex( uploader_m = re.search(
r'<strong>Broadcast Network: </strong>\s*([^<]*)<', webpage, r'<strong>Broadcast Network: </strong>\s*([^<]*)<', webpage)
u'uploader') if uploader_m is None:
if uploader is not None: uploader = None
uploader = uploader.strip() else:
uploader = uploader.group(1).strip()
rating_str = self._html_search_regex( rating_str = self._html_search_regex(
r'<strong>Rating: </strong>\s*([^<]*)<', webpage, r'<strong>Rating: </strong>\s*([^<]*)<', webpage,