diezo / Ensta

🔥 Fast & Reliable Python Package For Instagram API - 2024
https://bit.ly/ensta-discord
MIT License
371 stars 44 forks source link

Proxy Support? #14

Closed juanpnvd closed 1 year ago

juanpnvd commented 1 year ago

Would be awesome to have proxy support natively, thank you.

diezo commented 1 year ago

Hi! Thankyou for using Ensta.

I've implemented basic proxy support as of now in the Host, Guest & AutoHost classes. Here's the code:

from ensta import Guest

proxy = {"http": "0.0.0.0:80", "https": "0.0.0.0:443"}  # Replace with your own proxy
guest = Guest(proxy=proxy)

print(guest.profile("cristiano"))

Make sure you update the library by running: pip install ensta --upgrade

I'll start rolling out major proxy updates in the future. If you have any issues regarding the usage of this library, feel free to mention them here.

Thankyou

juanpnvd commented 1 year ago

Thank you, it works great! By any chance, do you know how much followers i can scrape in one go, or how the rate limits works right now? I want to be careful.

diezo commented 1 year ago

Earlier, I managed to fetch 2,000 followers in one go (then I stopped the program).

As of now, I don't have an exact estimate on what are the limits, but you can experiment using a dummy account.

To be on the safe side, you can add time limits between requests (eg. fetching 50-60 followers then waiting before fetching the next chunks).

juanpnvd commented 1 year ago

Thank you for your guidance, keep up the great work!