Merge pull request #350 from aviperes/bugfix_facebook_missing_meta_data

facebook fixes
This commit is contained in:
aviperetz34 2020-08-03 08:09:49 +03:00 committed by GitHub
commit 1c9fcab222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,6 +440,7 @@ class FacebookIE(InfoExtractor):
_lowercase_escape(self._search_regex(r'\"ownerName\":"(.+?)"', tahoe_data.secondary, 'uploader_id', _lowercase_escape(self._search_regex(r'\"ownerName\":"(.+?)"', tahoe_data.secondary, 'uploader_id',
fatal=False)) or \ fatal=False)) or \
self._search_regex(r'ownerName"\s*:\s*"([^"]+)"', webpage, 'uploader', default=None) or \ self._search_regex(r'ownerName"\s*:\s*"([^"]+)"', webpage, 'uploader', default=None) or \
self._search_regex(r'ownerName"\s*:\s*"([^"]+)"', tahoe_data.primary, 'uploader', default=None) or \
self._og_search_title(webpage, default=None) self._og_search_title(webpage, default=None)
timestamp = self._resolve_timestamp(webpage, tahoe_data) timestamp = self._resolve_timestamp(webpage, tahoe_data)
@ -806,6 +807,9 @@ class FacebookIE(InfoExtractor):
if not thumbnail: if not thumbnail:
thumbnail = self._search_regex(r'"thumbnailUrl":"(.+?)"', webpage, 'thumbnail', fatal=False) thumbnail = self._search_regex(r'"thumbnailUrl":"(.+?)"', webpage, 'thumbnail', fatal=False)
if not thumbnail:
thumbnail = self._search_regex(r'"preferredThumbnailURI":"(.+?)"', tahoe_data.primary, 'thumbnail',
fatal=False)
thumbnail = str(thumbnail).replace('\\', "") thumbnail = str(thumbnail).replace('\\', "")
return thumbnail return thumbnail