1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[twitter] Fix stop before real end (#573)

* [twitter] Fix stop before real end

Fix for https://github.com/mikf/gallery-dl/issues/544. Makes sure that it really reached the end by checking that both "min_position" is null and "has_more_items" is false before stopping.

* [twitter] Fix stop before real end (update)
This commit is contained in:
Alice 2020-01-14 03:24:30 -08:00 committed by Mike Fährmann
parent 8bb32ee188
commit f498a9057f

View File

@ -230,9 +230,12 @@ class TwitterExtractor(Extractor):
for tweet in text.extract_iter(
data["items_html"], '<div class="tweet ', '\n</li>'):
yield tweet
if not data["has_more_items"]:
return
if data.get("min_position") is None:
if data["has_more_items"] and "min_position" not in data:
pass
else:
return
if "min_position" in data:
position = data["min_position"]