]> jfr.im git - yt-dlp.git/commitdiff
[ie/facebook] Improve thumbnail extraction (#9060)
authorkclauhk <redacted>
Sun, 28 Jan 2024 18:41:56 +0000 (02:41 +0800)
committerGitHub <redacted>
Sun, 28 Jan 2024 18:41:56 +0000 (18:41 +0000)
Authored by: kclauhk

yt_dlp/extractor/facebook.py

index 84856abe1b07cd95053f6f7027db4113ccf0d68f..2fbdf1c37cad5b742a961e20374fa39bfef21b1d 100644 (file)
@@ -682,6 +682,9 @@ def parse_attachment(attachment, key='media'):
                 # honor precise duration in video info
                 if video_info.get('duration'):
                     webpage_info['duration'] = video_info['duration']
                 # honor precise duration in video info
                 if video_info.get('duration'):
                     webpage_info['duration'] = video_info['duration']
+                # preserve preferred_thumbnail in video info
+                if video_info.get('thumbnail'):
+                    webpage_info['thumbnail'] = video_info['thumbnail']
                 return merge_dicts(webpage_info, video_info)
 
         if not video_data:
                 return merge_dicts(webpage_info, video_info)
 
         if not video_data: