[twitter] prevent exception in '_extract_components()' (#7139)
This commit is contained in:
@@ -237,7 +237,7 @@ class TwitterExtractor(Extractor):
|
|||||||
def _extract_components(self, tweet, data, files):
|
def _extract_components(self, tweet, data, files):
|
||||||
for component_id in data["components"]:
|
for component_id in data["components"]:
|
||||||
com = data["component_objects"][component_id]
|
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 ():
|
for url in conv.get("mediaUrls") or ():
|
||||||
files.append({"url": url})
|
files.append({"url": url})
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.29.1"
|
__version__ = "1.29.2-dev"
|
||||||
__variant__ = None
|
__variant__ = None
|
||||||
|
|||||||
Reference in New Issue
Block a user