diff options
author | ringus1 <ringus1@users.noreply.github.com> | 2024-02-15 13:46:57 -0600 |
---|---|---|
committer | bashonly <bashonly@protonmail.com> | 2024-02-15 16:51:43 -0600 |
commit | 2e30b5567b5c6113d46b39163db5b044aea8667e (patch) | |
tree | 8c0a7c4f5c8c539f73e36256cf5bc14b8a7ef03b | |
parent | beaa1a44554d04d9fe63a743a5bb4431ca778f28 (diff) |
[ie/facebook] Improve extraction
Partially addresses #4311
Authored by: jingtra, ringus1
Co-authored-by: Jing Kjeldsen <jingtra@gmail.com>
-rw-r--r-- | yt_dlp/extractor/facebook.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py index 830bbcc3c..834b1df18 100644 --- a/yt_dlp/extractor/facebook.py +++ b/yt_dlp/extractor/facebook.py @@ -500,6 +500,7 @@ class FacebookIE(InfoExtractor): webpage, 'description', default=None) uploader_data = ( get_first(media, ('owner', {dict})) + or get_first(post, ('video', 'creation_story', 'attachments', ..., 'media', lambda k, v: k == 'owner' and v['name'])) or get_first(post, (..., 'video', lambda k, v: k == 'owner' and v['name'])) or get_first(post, ('node', 'actors', ..., {dict})) or get_first(post, ('event', 'event_creator', {dict})) or {}) @@ -583,8 +584,8 @@ class FacebookIE(InfoExtractor): def extract_relay_prefetched_data(_filter): return traverse_obj(extract_relay_data(_filter), ( 'require', (None, (..., ..., ..., '__bbox', 'require')), - lambda _, v: 'RelayPrefetchedStreamCache' in v, ..., ..., - '__bbox', 'result', 'data', {dict}), get_all=False) or {} + lambda _, v: any(key.startswith('RelayPrefetchedStreamCache') for key in v), + ..., ..., '__bbox', 'result', 'data', {dict}), get_all=False) or {} if not video_data: server_js_data = self._parse_json(self._search_regex([ |