Browse Source

[facebook] fallback to twitter:image meta for thumbnail extraction(closes #21224)

Remita Amine 6 năm trước cách đây
mục cha
commit
82f68e4a01
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      youtube_dl/extractor/facebook.py

+ 1 - 1
youtube_dl/extractor/facebook.py

@@ -428,7 +428,7 @@ class FacebookIE(InfoExtractor):
         timestamp = int_or_none(self._search_regex(
         timestamp = int_or_none(self._search_regex(
             r'<abbr[^>]+data-utime=["\'](\d+)', webpage,
             r'<abbr[^>]+data-utime=["\'](\d+)', webpage,
             'timestamp', default=None))
             'timestamp', default=None))
-        thumbnail = self._og_search_thumbnail(webpage)
+        thumbnail = self._html_search_meta(['og:image', 'twitter:image'], webpage)
 
 
         view_count = parse_count(self._search_regex(
         view_count = parse_count(self._search_regex(
             r'\bviewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
             r'\bviewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',