Closed loosiegoosey closed 5 months ago
Thanks for the suggestion @loosiegoosey, I think it makes a lot of sense. I'll work on this asap 👌
Perhaps a visit to the users page: https://www.instagram.com/accounts/blocked_accounts/
@molinto good idea. perhaps parse the HTML and extract the blocked usernames using a library like beautifulsoup4 to scrape the webpage?
It's a good idea, I believe we'll have to deal with some kind of pagination though. Having +300 blocked accounts already takes some time to load the full list.
Ideally I'd do this via instagrapi but I don't see any way of getting this info (as @loosiegoosey mentioned)
After researching this, it seems that scrapping Instagram would not be the best solution, as Instagram tracks all scrapping activity and may lead to banning. Instead, I'd go for a more custom solution by manually keeping track of all blocked users in the repository cache dir after the first execution.
Closing this issue after applying the last suggestion. Keeping it this way until instagrapi allows to retrieve the list of an account's blocked users.
As the username block list grows in length, it might be more efficient to get a list of blocked users from Instagram to compare currently blocked usernames with the Instagram username list. I looked at the instagrapi documentation a bit and didn't see anything like get_blocked_users, so I'm not entirely sure if what I'm proposing is possible.