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

[instagram] allow disabling 'cursor' output

This commit is contained in:
Mike Fährmann 2024-08-17 19:04:17 +02:00
parent c0668f5106
commit e29f4ef226
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 23 additions and 1 deletions

View File

@ -2392,6 +2392,24 @@ Description
* ``"graphql"``: GraphQL API - lower-resolution media
extractor.instagram.cursor
--------------------------
Type
* ``bool``
* ``string``
Default
``true``
Example
``"3414259811154179155_25025320"``
Description
Controls from which position to start the extraction process from.
* ``true``: Start from the beginning.
Log the most recent ``cursor`` value when interrupted before reaching the end.
* ``false``: Start from the beginning.
* any ``string``: Start from the position defined by this value.
extractor.instagram.include
---------------------------
Type

View File

@ -378,7 +378,11 @@ class InstagramExtractor(Extractor):
"full_name": user["full_name"]})
def _init_cursor(self):
return self.config("cursor") or None
cursor = self.config("cursor", True)
if not cursor:
self._update_cursor = util.identity
elif isinstance(cursor, str):
return cursor
def _update_cursor(self, cursor):
self.log.debug("Cursor: %s", cursor)