[twitter] fix "UnboundLocalError: 'last_tweet'" (#8613)

https://github.com/mikf/gallery-dl/issues/8613#issuecomment-3628782844
This commit is contained in:
Mike Fährmann
2025-12-08 21:18:07 +01:00
parent ef9c472f94
commit a35e20077d

View File

@@ -1991,7 +1991,7 @@ class TwitterAPI():
"Unable to retrieve Tweets from this timeline")
tweets = []
tweet = None
tweet = last_tweet = None
api_tries = 1
if pinned_tweet is not None and isinstance(pinned_tweet, dict):
@@ -2142,6 +2142,7 @@ class TwitterAPI():
return extr._update_cursor(None)
self.log.debug("Switching to 'count: %s'", count[-1])
variables["count"] = count.pop()
continue
else:
self.log.debug(
"No Tweet results (%s/%s)",