Alexander Graf
328e93b0bc
Annotate Profile.mediacount as Optional
2026-10-23 23:40:53 +02:00
Alexander Graf
653efed311
Query Post metadata through api/graphql when not logged in
2026-10-23 23:40:31 +02:00
Alexander Graf
133e5c442c
Fetch clips play count only when Post.video_play_count is accessed
2026-10-23 23:40:13 +02:00
Alexander Graf
28d991f765
Fix Profile.mediacount from the logged-out profile page
2026-10-23 23:39:34 +02:00
Alexander Graf
fa6baebc66
Raise LoginRequiredException in Profile.get_posts() for private profiles when not logged in
2026-10-23 23:36:53 +02:00
Alexander Graf
c0e47314c2
Fix Profile.get_posts() when not logged in
2026-10-23 23:33:28 +02:00
Alexander Graf
e628a8d04a
Allow api/graphql queries when not logged in
2026-10-23 23:27:30 +02:00
Alexander Graf
3641b44796
First Beta Release for Version 4.16
v4.16b1
2026-10-21 22:18:21 +02:00
Alexander Graf
c56552c5e9
Merge branch 'master' into upcoming/v4.16
2026-10-21 22:01:45 +02:00
Alexander Graf
6cca56ec71
Do not let MyPy analyze the untyped browser_cookie3 module
2026-10-21 21:53:24 +02:00
Alexander Graf
93ff75f51c
Annotate InstaloaderContext.username as Optional[str]
2026-10-21 21:53:18 +02:00
Alexander Graf
0cce956fac
Remove the suggestion-mode option from .pylintrc
...
PyLint 4 removed it.
2026-10-21 21:53:12 +02:00
Alexander Graf
9252370503
Raise PrivateProfileNotFollowedException in Profile.get_posts()
2026-10-21 21:53:01 +02:00
Alexander Graf
d972d9a48c
Query logged-in profile posts through the web app's api/graphql endpoint
...
graphql/query answers with feedback_required; api/graphql needs the
fb_dtsg, lsd and av tokens of the logged-in page.
2026-10-21 21:48:43 +02:00
Mayank Padia and Claude Opus 5.5
7d543dc644
Fix Profile.get_posts() when logged in by updating the posts query
...
Instagram now answers doc_id 28975909992013618 with 400 "feedback_required".
Use the query the web app currently sends for a profile's posts tab
(PolarisProfilePostsTabContentQuery_connection), doc_id 29104886249145907,
with its current relay provider variables.
(cherry picked from commit 804894a0b1 , #2785 )
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-21 21:48:43 +02:00
Alexander Graf
4948d7a63c
Share the page request of get_page_data()
2026-10-21 21:48:43 +02:00
Alexander Graf
1eab8cafda
Report the login redirect in get_page_data()
...
Instead of reporting "302 Found" for profiles that need a login.
2026-10-21 21:44:35 +02:00
Alexander Graf
54033f9ea6
Share the session setup of the two GraphQL query methods
2026-10-21 21:43:47 +02:00
Alexander Graf
bafd1bf14c
Turn the retry in _retry_on_connection_error() into a loop
2026-10-21 21:34:24 +02:00
Alexander Graf
309708225c
Remove the dead _attempt parameter of get_raw()
...
Unused since a9e79e9 moved the download retry into
_retry_on_connection_error().
2026-10-21 21:31:13 +02:00
Alexander Graf
ba70aec490
Share the download status-code handling of get_raw() and head()
...
Kept separate from _raise_for_status(), as CDN downloads follow a
different status policy than the API.
2026-10-21 21:28:08 +02:00
Alexander Graf
fb018c81ca
Do not re-send POST data as query arguments when following a redirect
2026-10-21 21:28:08 +02:00
Alexander Graf
a6c279211d
Do not crash on a fatal status response without Content-Type
2026-10-21 21:22:27 +02:00
Alexander Graf
f4e1f3c95e
Refactor InstaloaderContext.get_json() for readability
...
Split it into small helpers and retry in a loop instead of recursively.
This also fixes retried POST queries being repeated as GET.
2026-10-21 21:21:14 +02:00
Alexander Graf
7efa2de6fe
Fix get_feed_posts() with the api/v1/feed/timeline endpoint
...
The GraphQL query used so far now returns edge_web_feed_timeline: null, which
raised a TypeError. Page through api/v1/feed/timeline/ instead and convert its
media items (iPhone format).
Fixes #2556
2026-10-14 22:03:07 +02:00
André Koch-Kramer
58c07c6393
Include licenses in windows exe zip file
2026-10-13 21:33:05 +02:00
Alexander Graf
21d10a7f3e
Merge branch 'master' into upcoming/v4.16
2026-10-12 22:07:09 +02:00
Alexander Graf
bc859a1595
Release of version 4.15.4
v4.15.4
2026-10-12 22:00:00 +02:00
Alexander Graf
b5e50aa260
Update contributing guidelines
2026-10-12 21:54:36 +02:00
Markus Magnuson
0cf00a6079
Fix profile resolution and logged-in post fetching ( #2765 )
...
- `InstaloaderContext.get_page_data()` loads a page as a logged-out visitor and returns the query results that the page embeds. Instagram only embeds them when the request looks like a page navigation, so the request sends the `Sec-Fetch-*` headers of one.
- `Profile.from_username()` reads the profile from its public page. Anonymously, `_normalize_profile_data()` completes the node.
- Logged in, `Profile.get_posts()` uses query `28975909992013618` (`PolarisProfilePostsTabContentQuery_connection`) with the variables that the web app sends. The response has the same shape as before.
When logged in, `from_username()` does not normalize the page's node. The page shows the profile to a logged-out visitor, so normalizing would set `followed_by_viewer` to `False`, and `download_profiles()` would refuse private profiles that the session follows. Instead, the GraphQL profile query in `_obtain_metadata()` fills in the missing fields when they are first read.
2026-10-12 21:39:03 +02:00
Alexander Graf
c7d3e8dc0e
Merge branch 'master' into upcoming/v4.16
2026-10-11 21:07:50 +02:00
Alexander Graf
91e30cf33b
Support Python 3.15
2026-10-11 20:01:02 +02:00
Alexander Graf
da65e697a0
Update dependencies
2026-10-10 20:53:07 +02:00
dependabot[bot] and dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
132e2fa668
Bump actions/stale from 10 to 11 ( #2751 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 20:26:16 +02:00
dependabot[bot] and dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e3aef9dc2b
Bump pyinstaller from 6.16.0 to 6.22.3 ( #2755 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 20:13:48 +02:00
dependabot[bot] and dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dd90abdb91
Bump pygments from 2.19.2 to 2.20.0 ( #2758 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 20:06:46 +02:00
dependabot[bot] and dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2e3c89dfe9
Bump requests from 2.32.5 to 2.34.2 ( #2756 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 19:59:07 +02:00
dependabot[bot] and dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c4434125e8
Bump actions/setup-python from 6 to 7 ( #2752 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 19:56:46 +02:00
dependabot[bot] and dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75173094d6
Bump mypy from 1.18.2 to 2.4.0 ( #2754 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 19:50:42 +02:00
Alexander Graf
559c7a9adf
Drop Python 3.9 support, update Pipenv version used in CI
2026-10-10 19:45:43 +02:00
Andreas Fehlner and Alexander Graf
1e58dddb1f
chore: add monthly Dependabot and harden checkout ( #2713 )
...
## What this changes
This PR adds Dependabot configuration and hardens GitHub Actions
checkout behavior.
## Dependabot
- adds .github/dependabot.yml
- enables grouped dependency updates
- schedules updates monthly
- configures a 7-day cooldown to avoid rapid follow-up bumps
- includes GitHub Actions updates
Configured update scopes:
- pip in /
- github-actions in /
## GitHub Actions hardening
Sets persist-credentials: false for ctions/checkout@v4 in:
- .github/workflows/windows_exe.yml
- .github/workflows/packages.yml
- .github/workflows/lint.yml
- .github/workflows/documentation.yml
## Why
- grouped updates reduce PR noise
- monthly cadence is lower maintenance
- cooldown helps avoid update churn
- disabling persisted checkout credentials follows least-privilege CI
practices
---------
Co-authored-by: Alexander Graf <17130992+aandergr@users.noreply.github.com >
2026-10-10 19:29:14 +02:00
Alexander Graf
af898e2c31
Reference new integration tests and remove deprecated instaloader_unittests
2026-10-10 19:09:30 +02:00
Alexander Graf
8f680ae52d
Add __repr__ to Instaloader and InstaloaderContext
2026-10-10 18:39:15 +02:00
agustux
7efc78de12
docs/codesnippets: Fix Firefox 147+ Linux cookie path ( #2727 )
2026-09-06 20:20:51 +02:00
Alexander Graf
0c143b6121
Merge branch 'master' into upcoming/v4.16
2026-07-26 11:19:13 +02:00
Alexander Graf
543469296e
Release of version 4.15.3
v4.15.3
2026-07-26 11:01:52 +02:00
Elias
6dd77e7b56
Fix Post metadata fetching ( #2706 )
...
Use doc_id 27128499623469141 (PolarisPostRootQuery /
xdt_api__v1__media__shortcode__web_info) which returns v1/iPhone API format. Converts the new format to the legacy GraphQL field names that the rest of the codebase expects.
2026-07-26 10:47:46 +02:00
Markus Magnuson
a4adeb0835
Fix profile resolution ( #2701 )
...
Fix Profile.from_id(), Profile.from_username() and Profile._obtain_metadata() by using `users/web_profile_info/` and `users/{profile_id}/info` queries.
2026-07-26 10:18:00 +02:00
Joseph May
ad03b392db
Fix caption mentions being missed after a newline
...
_mention_regex required the character before '@' to be a non-word
character other than '\n', so a mention at the start of a new line was
never matched. The '\n' exclusion was introduced in 8784ac7 when the
prefix went from '\W' to '[^\w\n]'; restoring '\W' matches mentions
after a newline while still keeping email addresses out of the results,
since the character before '@' in an address is a word character.
Also affects Profile.biography_mentions and StoryItem.caption_mentions,
which share the same regex.
Fixes #2709
2026-07-13 20:48:06 +02:00
André Koch-Kramer
297a88f252
Release of version 4.15.2
v4.15.2
2026-07-05 21:16:53 +02:00