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.
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.
* Bypass IP-based redirects to /accounts/login
There are two main changes made:
For users, we request /{username}/feed/ instead of /{username}/. For some
reason, this completely bypasses the login redirect. This page doesn't
work in browser while blocked, but fortunately all the data we need is
just present in the HTML page.
For posts, we change from using the /p/ page to using the graphql
endpoint for the same data, which is still subject to graphql rate
limits, but is not subject to login redirects. The data is identical
between the two pages, apart from the object keys being sorted
differently and rhx_gis being missing on graphql.
Yes, this now unblocks access from VPNs, Tor, cloud servers, etc.
* Apply requested patch to fix comments
* Remove rhx_gis from Post and Profile
Co-authored-by: Alexander Graf <17130992+aandergr@users.noreply.github.com>
If logged-in, Post.url and Post.get_sidecar_nodes() now use the iPhone API
endpoint to obtain the highest-resolution image version. Resolves#630.
A notice "Warning: Use --login to download higher-quality versions of pictures"
is issued if the user tries to download posts without being logged-in.
Further, the message "Errors occurred:", which is displayed when the
InstaloaderContext is closed, has been changed to "Errors or warnings
occurred:".
I saw the abbreviated caption output from save_caption and realized it was perfect for --filename-pattern. Even if this pull request is not accepted, please do not abandon the idea within. The ability to put captions in file names is *very* useful.
Unfortunately, it is now required to be logged in to access the HD version of
profile pictures. When attempting to download profile pictures without --login,
a warning message is printed once, and the lower-quality versions are obtained.
For backwards compatibility, already-downloaded profile pictures are
overwritten if the now-obtainable version is assumed to be of better quality
than the existing one (determined by file size vs Content-Length).
The iPhone endpoint is accessed with code exhumed from
c355338010a2a94c8a75f3001d0ea879b4f42383. Also, this reverts "Profile: don't
access removed iphone info endpoint" 08327c41172e125a003b7bb6a015b04c4645ef27.
This fixes#209.