[twitter] prevent exception in '_extract_components()' (#7139)

This commit is contained in:
Mike Fährmann
2025-03-09 10:15:18 +01:00
parent 3eba856e13
commit a859abf6a1
2 changed files with 2 additions and 2 deletions

View File

@@ -237,7 +237,7 @@ class TwitterExtractor(Extractor):
def _extract_components(self, tweet, data, files):
for component_id in data["components"]:
com = data["component_objects"][component_id]
for conv in com["data"]["conversation_preview"]:
for conv in com["data"].get("conversation_preview") or ():
for url in conv.get("mediaUrls") or ():
files.append({"url": url})

View File

@@ -6,5 +6,5 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.29.1"
__version__ = "1.29.2-dev"
__variant__ = None