[GH-ISSUE #34] Issue with fetching latest post when pinned posts are present #23

Closed
opened 2026-02-27 20:05:02 +03:00 by kerem · 2 comments
Owner

Originally created by @jl-nr on GitHub (Jan 6, 2026).
Original GitHub issue: https://github.com/misiektoja/instagram_monitor/issues/34

I spotted something interesting. When a user has pinned posts, it correctly detects the latest one in session mode, even if that's not the pinned one. But when using anonymous mode, it seems to always report the first pinned post. Bug?

Originally created by @jl-nr on GitHub (Jan 6, 2026). Original GitHub issue: https://github.com/misiektoja/instagram_monitor/issues/34 I spotted something interesting. When a user has pinned posts, it correctly detects the latest one in session mode, even if that's not the pinned one. But when using anonymous mode, it seems to always report the first pinned post. Bug?
kerem closed this issue 2026-02-27 20:05:02 +03:00
Author
Owner

@misiektoja commented on GitHub (Jan 6, 2026):

Thanks for pointing that out! You're absolutely correct. I missed this because none of my test accounts have pinned posts, so it totally slipped under the radar.

It seems like the tool is only checking the very first item in the API response (edges[0]) when in anonymous mode. And since pinned posts grab those top spots, the tool wrongly assumes the first pinned post is the latest, which means it’s ignoring all the exciting new updates below. I was aiming to keep request numbers low to dodge Instagram's radar, but I might have gone a bit overboard with it. Luckily, it shouldn't be too hard to fix!

<!-- gh-comment-id:3715818579 --> @misiektoja commented on GitHub (Jan 6, 2026): Thanks for pointing that out! You're absolutely correct. I missed this because none of my test accounts have pinned posts, so it totally slipped under the radar. It seems like the tool is only checking the very first item in the API response (edges[0]) when in anonymous mode. And since pinned posts grab those top spots, the tool wrongly assumes the first pinned post is the latest, which means it’s ignoring all the exciting new updates below. I was aiming to keep request numbers low to dodge Instagram's radar, but I might have gone a bit overboard with it. Luckily, it shouldn't be too hard to fix!
Author
Owner

@misiektoja commented on GitHub (Jan 6, 2026):

Issue fixed and is available in the latest beta v2.1 on the dev branch: instagram_monitor.py

<!-- gh-comment-id:3716775355 --> @misiektoja commented on GitHub (Jan 6, 2026): Issue fixed and is available in the latest beta v2.1 on the dev branch: [instagram_monitor.py](https://raw.githubusercontent.com/misiektoja/instagram_monitor/refs/heads/dev/instagram_monitor.py)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/instagram_monitor#23
No description provided.