Remove unnecessary queries when a file in a target does not have to be
re-downloaded.
This significantly speeds up the download in cases where the majority of media
is already present locally.
Co-Authored-By: André Koch-Kramer <koch-kramer@web.de>
Avoid evaluating 'url' when preparing the filename if the
filename-pattern does not contain the "{filename}" token. This avoids
the URL to be queried even though it is not needed (e.g. with
--no-pictures).
Fixes efficiency of the download_profiles() function when called with
--no-posts --no-profile-pic by reordering an if statement.
This inefficiency has been reported in #724.
Co-authored-by: André Koch-Kramer <koch-kramer@web.de>
Allows to open the firefox cookie database even though Firefox is
holding a lock.
Fixes the "Cookie import failed: database is locked" message when using
the script while Firefox was running.
This has been reported in #877.
Add feature from issue #892 (Save content using original filenames)
- The new feature would download posts and save the images/videos with the original filenames.
- The implementation follows the other options for the filename-pattern parameter. As filename is related to a single file and not the whole post, for sidecar nodes the filename is calculated again.
- Using this option media from one post is only grouped together by the file modification timestamp.
This updated graph query hash returns all fields for `tappable_objects`. These fields were missing/partial when using the old query hash.
This allows to get the full json metadata of a story.
Sets a default request timeout of 300 seconds to fix Instaloader hanging indefinitely when used on an unstable internet connection without using --request-timeout, such as in #810.
Fixes wrong "Profile does not exist" error.
Co-authored-by: André Koch-Kramer <koch-kramer@web.de>
Co-authored-by: Alexander Graf <17130992+aandergr@users.noreply.github.com>
Adds a method Profile.own_profile() which uses the test_login() query for
obtaining the own profile. This method is used for accesssing saved posts
(Profile.get_saved_posts() on own profile).
Also removes the now-unneeded self._obtain_metadata() call in
Profile.get_saved_posts(), and changes the NodeIterator such that data is never
None and the count property is more likely available.
Fixes #563.