With this change, Instaloader is capable of resuming a previously-aborted download loop. To do so, it creates a JSON file within the target directory when interrupted, that contains all the necessary information to later resume that operation.
Resuming an interrupted download is supported for most, but not all targets. It is supported for:
- Regular profile posts,
- IGTV posts
- Saved posts,
- Tagged posts,
- Explore posts.
The presence of a sessionfile avoids the usage of the failure-prone login
mechanism. This commit addresses a suggestion in #615 to store the sessionfile
in a persistent path rather than a path within a temporary directory if no
--sessionfile parameter is given.
The default path is now:
$XDG_CONFIG_HOME/instaloader/session-USERNAME or
~/.config/instaloader/session-USERNAME on Unix,
%LOCALAPPDATA%\Instaloader\session-USERNAME on Windows.
If no file exists in the new path, Instaloader tries loading from the path
where the sessionfile was stored before this commit, hence it automatically
migrates to the new sessionfile path.
* Add %location search option
Search for posts for a given location ID using %[location id] as the query
* Document %location search
* Make pylint happy
* Use correct paths for location results
* Fix —help output
Add description of location argument and fix output error for short help.
* Add unit tests for location download
* Add extra unit test for locations
The commit mode ensures pictures are not corrupted when Instaloader is
unexpectedly interrupted. In the case that the last picture is corrupted
because of an interruption, Instaloader will redownload the picture.
Since the metadata is the last object saved to disk, we can consider a
post as "committed" if its json metadata file exists and is not
malformed. Instaloader should download any posts which are not
committed. Downside is commit mode requires metadata to be saved.
Squashed commit of the following (pr #161):
commit 58235a99b0
Author: AndCycle <andcycle@andcycle.idv.tw>
Date: Thu Aug 16 17:57:26 2018 +0800
doc: proper fix rst syntax
commit 6620e3583c
Author: AndCycle <andcycle@andcycle.idv.tw>
Date: Thu Aug 16 17:29:25 2018 +0800
doc: fix syntax
commit 7a048a3c04
Author: AndCycle <andcycle@andcycle.idv.tw>
Date: Thu Aug 16 17:09:26 2018 +0800
doc: add info about read args from file.
commit c4ceaf9636
Author: AndCycle <andcycle@andcycle.idv.tw>
Date: Thu Aug 16 17:05:07 2018 +0800
alter `fromfile_prefix_chars` to plus sign to avoid conflict.
commit d469b52b95
Author: AndCycle <andcycle@andcycle.idv.tw>
Date: Mon Aug 6 19:10:23 2018 +0800
* Allow reading arguments from file
function referenced from instagram-scraper,
which provide a convenient way to hide sensitive information.
{date_utc} encodes the post creation date in UTC rather than the
current local timezone, as {date} does.
This was proposed in #69. Encoding the post creation date in
local time zone induces problems regarding --fast-update when the
time zone is changed.
The introductionary sections of as-module and cli-options have been
rewritten. Further, Instaloader's short-description is now included in
the sidebar.
- Added owner_id and mediaid to Post class properties.
- In case of not downloading stories, the attributes of the Post class
can now be used in filename-pattern, e.g. {post.owner_id} or {post.mediaid}.
Closes #53.
- If when retrying a failed connection ^C is hit, the retrying is
aborted,
- Option --max-connection-attempts to override default of how many
connection attempts should be made.
Closes #51.
With --metadata-json, a JSON file for each post is created saving the
Post properties defined in instaloader.Post class, i.e. caption, number
of likes, people tagged in caption or the picture itself, etc.
This closes #33 and closes #47.