[twitter] fix avatar & background downloads with "expand": true (#8698)
This commit is contained in:
@@ -596,9 +596,12 @@ class TwitterExtractor(Extractor):
|
|||||||
obj = tweet["legacy"] if "legacy" in tweet else tweet
|
obj = tweet["legacy"] if "legacy" in tweet else tweet
|
||||||
cid = obj.get("conversation_id_str")
|
cid = obj.get("conversation_id_str")
|
||||||
if not cid:
|
if not cid:
|
||||||
tid = obj["id_str"]
|
if cid is False:
|
||||||
self.log.warning(
|
yield tweet
|
||||||
"Unable to expand %s (no 'conversation_id')", tid)
|
else:
|
||||||
|
tid = obj["id_str"]
|
||||||
|
self.log.warning(
|
||||||
|
"Unable to expand %s (no 'conversation_id')", tid)
|
||||||
continue
|
continue
|
||||||
if cid in seen:
|
if cid in seen:
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
@@ -613,6 +616,7 @@ class TwitterExtractor(Extractor):
|
|||||||
def _make_tweet(self, user, url, id_str):
|
def _make_tweet(self, user, url, id_str):
|
||||||
return {
|
return {
|
||||||
"id_str": id_str,
|
"id_str": id_str,
|
||||||
|
"conversation_id_str": False,
|
||||||
"lang": None,
|
"lang": None,
|
||||||
"user": user,
|
"user": user,
|
||||||
"source": "><",
|
"source": "><",
|
||||||
|
|||||||
Reference in New Issue
Block a user