1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[twitter] send initial 'cursor' only when given via option

This commit is contained in:
Mike Fährmann 2024-07-09 20:40:40 +02:00
parent ff39d28ef4
commit 8e747b6dee
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -1477,7 +1477,9 @@ class TwitterAPI():
def _pagination_legacy(self, endpoint, params):
extr = self.extractor
params["cursor"] = extr._init_cursor()
cursor = extr._init_cursor()
if cursor:
params["cursor"] = cursor
original_retweets = (extr.retweets == "original")
bottom = ("cursor-bottom-", "sq-cursor-bottom")
@ -1577,7 +1579,9 @@ class TwitterAPI():
pinned_tweet = extr.pinned
params = {"variables": None}
variables["cursor"] = extr._init_cursor()
cursor = extr._init_cursor()
if cursor:
variables["cursor"] = cursor
if features is None:
features = self.features_pagination
if features:
@ -1770,7 +1774,9 @@ class TwitterAPI():
def _pagination_users(self, endpoint, variables, path=None):
extr = self.extractor
variables["cursor"] = extr._init_cursor()
cursor = extr._init_cursor()
if cursor:
variables["cursor"] = cursor
params = {
"variables": None,
"features" : self._json_dumps(self.features_pagination),