浏览代码

[youporn] Fix uploader and description

Yen Chi Hsuan 9 年之前
父节点
当前提交
b99d88c6a1
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      youtube_dl/extractor/youporn.py

+ 2 - 4
youtube_dl/extractor/youporn.py

@@ -114,15 +114,13 @@ class YouPornIE(InfoExtractor):
             formats.append(f)
             formats.append(f)
         self._sort_formats(formats)
         self._sort_formats(formats)
 
 
-        description = self._html_search_regex(
-            r'(?s)<div[^>]+class=["\']video-description["\'][^>]*>(.+?)</div>',
-            webpage, 'description', default=None)
+        description = self._og_search_description(webpage, 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')
 
 
         uploader = self._html_search_regex(
         uploader = self._html_search_regex(
-            r'(?s)<div[^>]+class=["\']videoInfoBy["\'][^>]*>\s*By:\s*</div>(.+?)</(?:a|div)>',
+            r'(?s)<div[^>]+class=["\']videoInfoBy(?:\s+[^"\']+)?["\'][^>]*>\s*By:\s*</div>(.+?)</(?:a|div)>',
             webpage, 'uploader', fatal=False)
             webpage, 'uploader', fatal=False)
         upload_date = unified_strdate(self._html_search_regex(
         upload_date = unified_strdate(self._html_search_regex(
             r'(?s)<div[^>]+class=["\']videoInfoTime["\'][^>]*>(.+?)</div>',
             r'(?s)<div[^>]+class=["\']videoInfoTime["\'][^>]*>(.+?)</div>',