Hello! I am considering making an instagram bot that would run in browser through selenium. To be fair, I dobt really know anything about API usage, so I would run it all through pyautogui and selenium (using clicks and fills based on ID's). How efficient and effective would this be? Also, at what pount would I need to get a proxy/vpn?
|
Python
Instagram actions with selenium |
|
Apr 23, 2017 09:02 AM
(This post was last modified: Apr 23, 2017 09:05 AM by TheWarOwl.)
API's tend to be fairly limited and can cost you money, the plus side is they're incredibly fast because they run on the website's servers themselves, it also depends on what kind of information you're looking to get from Instagram.
If you use selenium the start of the program would be slow (Selenium uses webdrivers like chrome, firefox or phantomjs) so you'd have to wait for the browser to load - that'd be your main issue. However once it's up and going it wouldn't be too bad. Webdrivers are amazing and selenium can take full functionality from them so you wouldn't need pyautogui at all, you can send keystrokes, take screenshots of the entire page (or certain elements) and click buttons - even if the browser is minimized. This is because the webdriver can simulate those things without needing the real thing. As for vpn / proxy issue, yes and no. If you're just using it for a legit reason you probs don't need a vpn (I'm not one of those assholes that thinks privacy is only needed when you're doing illegal things lol. I'm just saying in general). Concerning a proxy - these are a lot more popular in webscraping / bots in case the website decides you're sending too many requests. Basically you just have it use 1 proxy in a list and as soon as you detect you've been blocked you switch to the second proxy etc... I'd recommend an anonymous proxy to avoid detection (proxy requests have a header in them that basically can tell the website you're on a proxy, anonymous proxy's do not). If Instagram doesn't start putting temporary blocks on you, no need to worry about a proxy 🤝 ![]() (Apr 23, 2017 09:02 AM)TheWarOwl Wrote: API's tend to be fairly limited and can cost you money, the plus side is they're incredibly fast because they run on the website's servers themselves, it also depends on what kind of information you're looking to get from Instagram. Sorry for a bit of an off-topic here, but do you know the cheapest way of getting anonymous proxies in bulks? thxxx (Apr 27, 2017 11:47 AM)gaidenukstiskrv Wrote: Sorry for a bit of an off-topic here, but do you know the cheapest way of getting anonymous proxies in bulks? thxxx You find some legit proxy list sites, turn on their filters and scrape 'em. Should be more than easy enough to figure out. Seriously, why do you even ask this question?
Just use selenium:
PHP Code seems pretty efficient to me :p and it also depends on your situation if a proxy is needed leave me a message if you need any help
Well I'd first try the requests library, but it all depends of what you are trying to do, so once you figure that out then you can pick the best rout.
Good luck though! —————————————————————— If you want to learn Python (or just about any language), Join Me! How do you like my redneck signature? |
|
|


![[Image: 5BgQiIm.gif]](https://i.imgur.com/5BgQiIm.gif)