ioantsaf / hacked_insta_unliker

Python script to detect and remove suspicious likes from Instagram
GNU General Public License v3.0
10 stars 0 forks source link

Requirements and Timers #1

Closed xiongqc closed 3 years ago

xiongqc commented 3 years ago

Thanks! I managed to remove around 40 fake likes at one go before a temporary block by Instagram. Perhaps a timer would be better to loop every 1-2 hours? There is also an API limit of 200: https://developers.facebook.com/docs/graph-api/overview/rate-limiting/

Additionally, since you used f-strings in your code. It may be helpful to others to state the requirement for Python 3.6 and above in readme.

ioantsaf commented 3 years ago

I knew rate limiting could happen but unfortunately I didn’t have a way to test it on many likes as I have already removed my malicious likes 😛 I will take a look at Instagram’s rate limits and put sleeps of some seconds or ms between the iterations. I think that should be enough.

I will also add the Python 3.6 requirement in the readme.

samomar commented 3 years ago

I think you can extract the remaining quota / your limit from the return headers somewhere.

It would be something similar to this https://developers.facebook.com/docs/graph-api/overview/rate-limiting/

ioantsaf commented 3 years ago

We don't use the official Graph API, but the private API that the mobile client uses. Thus, the rate limits cannot be determined: https://github.com/ping/instagram_private_api/issues/12#issuecomment-299757996

ioantsaf commented 3 years ago

Fixed in 84ff071dfb5690f349fa8fd13d82a2bdd799836b If you still get rate limiting issues or find that the script runs slowly, feel free to experiment with the s_min and s_max parameters.