marco97pa / Blackpink-Data

A Twitter bot that posts updates, pics, stats and news about BLACKPINK.
https://twitter.com/data_blackpink
MIT License
33 stars 13 forks source link

Instagram: impossible to scrape posts automatically #27

Open marco97pa opened 2 years ago

marco97pa commented 2 years ago

During the last year Instagram added new techniques to avoid bots using their platform. I have already been blocked on 2 Instagram account used to scrape. I am actually using the best Instagram library out of there: https://github.com/adw0rd/instagrapi As of today, whenever I run the script, it asks me to interactively verify my Instagram account by inserting a 6 digit code that was sent to my email associated with Instagram. The code works, but needs manual verification each time.
The code is running on GitHub Actions, on a Linux VM located somewhere in the USA: each execution instance of the code runs on a different machine, so Instagram needs to verify each access
The only way to avoid this is by running the code on my computer, so always using the same machine that already has an active Instagram login and manually pass the verification time to time. This is not an automated job and since a bot must be automated, I am about to drop Instagram support (and maybe stop the bot at all, since I will lose the most important source of it). Thanks Mark Zuckerberg for your awful platforms: always destroying the good thing.