瀏覽代碼

[xvideos] Fix thumbnail extraction (closes #15978)

Parmjit Virk 7 年之前
父節點
當前提交
0669f8fd8f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      youtube_dl/extractor/xvideos.py

+ 3 - 1
youtube_dl/extractor/xvideos.py

@@ -58,7 +58,9 @@ class XVideosIE(InfoExtractor):
             group='title') or self._og_search_title(webpage)
 
         thumbnail = self._search_regex(
-            r'url_bigthumb=(.+?)&amp', webpage, 'thumbnail', fatal=False)
+            (r'setThumbUrl\(\s*(["\'])(?P<thumbnail>(?:(?!\1).)+)\1',
+             r'url_bigthumb=(?P<thumbnail>.+?)&amp'),
+            webpage, 'thumbnail', fatal=False, group='thumbnail')
         duration = int_or_none(self._og_search_property(
             'duration', webpage, default=None)) or parse_duration(
             self._search_regex(