Skip to main content

Search

Items tagged with: scripting


I think I finally got my Instagram scraper script working well. It grabs the latest post from an IG account and shares it to my GoToSocial instance. It marks the post ID so it doesn't share the same post twice. However, the problem is pinned posts. Those will always be the top post on the account, breaking the functionality of the script.

The instaloader python module can't handle pinned posts anymore because IG removed the 'pinned_for_users' value from the post metadata. So instead I have it set up to skip the top 3 posts, which is the max number of pinned posts on IG. So it just grabs the newest post after the first 3. This works for Sleep Token because they generally always have 3 pinned posts, but for accounts that only have 1 or 2 pinned posts, it will skip 1 or 2 non-pinned posts.

I'm not sure how to handle this better. If anyone has any ideas, I'm open to suggestions.

#python #scripting #AskFedi

⇧