diff --git a/docs/configuration.rst b/docs/configuration.rst index 66645fae..633c913f 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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 diff --git a/gallery_dl/extractor/instagram.py b/gallery_dl/extractor/instagram.py index c05fe728..e84b8447 100644 --- a/gallery_dl/extractor/instagram.py +++ b/gallery_dl/extractor/instagram.py @@ -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)