[youporn] Make description optional

Some videos does not contain any description
This commit is contained in:
Sergey M․ 2015-10-25 23:01:12 +06:00
parent 589c33dade
commit feb7711cf5

View File

@ -92,7 +92,7 @@ def _real_extract(self, url):
description = self._html_search_regex( description = self._html_search_regex(
r'(?s)<div[^>]+class=["\']video-description["\'][^>]*>(.+?)</div>', r'(?s)<div[^>]+class=["\']video-description["\'][^>]*>(.+?)</div>',
webpage, 'description', fatal=False) webpage, 'description', default=None)
thumbnail = self._search_regex( thumbnail = self._search_regex(
r'(?:imageurl\s*=|poster\s*:)\s*(["\'])(?P<thumbnail>.+?)\1', r'(?:imageurl\s*=|poster\s*:)\s*(["\'])(?P<thumbnail>.+?)\1',
webpage, 'thumbnail', fatal=False, group='thumbnail') webpage, 'thumbnail', fatal=False, group='thumbnail')