2020-07-26 18:00:37 +02:00
|
|
|
Resumable Iterations
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
.. module:: instaloader
|
2024-08-10 17:53:01 +02:00
|
|
|
:no-index:
|
2020-07-26 18:00:37 +02:00
|
|
|
|
|
|
|
.. highlight:: python
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
:backlinks: none
|
|
|
|
|
|
|
|
For many download targets, Instaloader is able to resume a
|
2020-07-30 16:41:45 +02:00
|
|
|
previously-interrupted iteration. It provides an interruptible
|
2020-07-26 18:00:37 +02:00
|
|
|
Iterator :class:`NodeIterator` and a context manager
|
|
|
|
:func:`resumable_iteration`, which we both present here.
|
|
|
|
|
|
|
|
.. versionadded:: 4.5
|
|
|
|
|
|
|
|
``NodeIterator``
|
|
|
|
""""""""""""""""
|
|
|
|
|
|
|
|
.. autoclass:: NodeIterator
|
|
|
|
:no-show-inheritance:
|
|
|
|
|
|
|
|
.. autoclass:: FrozenNodeIterator
|
|
|
|
:no-show-inheritance:
|
|
|
|
|
2021-04-12 16:53:59 +02:00
|
|
|
A serializable representation of a :class:`NodeIterator` instance, saving
|
|
|
|
its iteration state.
|
|
|
|
|
|
|
|
It can be serialized and deserialized with :func:`save_structure_to_file`
|
|
|
|
and :func:`load_structure_from_file`, as well as with :mod:`json` and
|
2022-07-04 20:00:07 +02:00
|
|
|
:mod:`pickle` thanks to being a :class:`~typing.NamedTuple`.
|
2021-04-12 16:53:59 +02:00
|
|
|
|
2020-07-26 18:00:37 +02:00
|
|
|
``resumable_iteration``
|
|
|
|
"""""""""""""""""""""""
|
|
|
|
|
|
|
|
.. autofunction:: resumable_iteration
|