[facebook] Improve thumbnail extraction (#3392)

Authored by: Wikidepia
This commit is contained in:
Akmal 2022-04-13 08:21:23 +07:00 committed by GitHub
parent 743f39750c
commit cda1bc5197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -525,7 +525,8 @@ class FacebookIE(InfoExtractor):
info = {
'id': v_id,
'formats': formats,
'thumbnail': try_get(video, lambda x: x['thumbnailImage']['uri']),
'thumbnail': traverse_obj(
video, ('thumbnailImage', 'uri'), ('preferred_thumbnail', 'image', 'uri')),
'uploader_id': try_get(video, lambda x: x['owner']['id']),
'timestamp': int_or_none(video.get('publish_time')),
'duration': float_or_none(video.get('playable_duration_in_ms'), 1000),