It seems there is a limit of how many user stories can be requested at once.
Now, Instaloader.get_stories() chunks the stories request.
Fixes#157 and fixes#134.
Override get_value() rather than get_field(), to allow chaining of item
attributes, such as --post-metadata-txt={owner_profile.profile_pic_url}.
Motivated by #151.
If using --stories or --stories-only the stories got donwloaded along
with the profiles one by one. Now, the stories get downloaded in a
similar aproach like when using the :stories target, i.e.
download_stories() gets only called once.
Profile.has_highlight_reels is broken and now always returns true.
This fixes#153.
Profile.get_profile_pic_url() and Profile.has_highlight_reels did the same
query without remembering the response, resulting in that query being made
twice when downloading stories and profile pic of a profile.
Further, document all attributes that are referred to, and ensure that there
will be no broken references again by letting Travis call Sphinx with -W -n.
Since the property has_highlight_reel is no longer available throught
the previously used graphql query, this information needs to be obtained
in another way. Therefore the properties has_highlight_reels,
has_public_story and has_viewable_story were added to the Profile class.
Since has_public_story can be obtained throught graphql queries without
being rate limited when invoked anonymously, the ability to use an
anonymous copy of the context was added to to the InstaloaderContext class.
Fixes#116
This is a simple modification to save GraphQL queries, hence to more likely
stay within rate limits without having to wait between profiles.
Fixes#112.
- Cast id and created_at from JSON to int to be compatible with comments JSON
files from Instaloader 3.3,
- Do not fail if comment JSON files are empty,
- Close file descriptors of comment JSON files when reading,
- Do no create empty comment JSON files if generating content fails.
Closes#114.
This improves speed, as get_saved_posts() returns Posts that do not have
owner_profile info. So, printing the owner_username often required an
additional request.
If an expression evaluates to None, an empty string is yielded, rather
than 'None'.
Blanks (and newlines) are strip()ed from the formatted strings, which
also avoids creation of whitespace-only textfiles.
save_captions parameter to Instaloader constructor has been removed, as
it is equivalent to setting both {post,storyitem}_metadata_txt_pattern
to '' (empty string).
Instaloader.save_caption() now prints the '[{old}] updated [{new}]' if
the caption was updated, rather than printing the new caption twice,
which was confusing.
Post.get_sidecar_edges() has been renamed to Post.get_sidecar_nodes().
Post.get_location() has been made to a property Post.location and it now
internally stores location struct and makes it JSON store-/loadable.
cherry-picked from commit d90c05e0a44cb0c41b98436ac18bfd1955a0a9ce
- Set GRAPHQL_PAGE_LENGTH to 50 what appears to be the new working maximum.
- Limit GQL queries to 20 per 666 seconds.
- Remove logic for tracking queries per query identifier as Instagram
only allows 20 overall GQL queries per sliding window.
Related to #101
* Fix Post.owner_profile in cases where initial owner struct contains id
only
* Assert node structure is complete enough at Post creation
* Fix get_followees() call in _main()
* Prefer importing from '.' rather than '.<submodule>' in __main__
* Fix name of instaloader_unittests ('-' is illegal in module names)
* Foreport 5fe2a70374b6e81dc875ad33bf44f1001a4f2fc0
"Fix downloading of hashtags"
* Foreport 67ac8f339716c498cddb2f1489eac6104409646c
"Enforce being logged in for getting username by id"