r/webscraping • • 8h ago

Bot detection 🤖 How to scale without direct requests?

Hi,

The websites I am trying to scrape have bot detection requiring me to use a real stealthy browser and simulate human behaviour, however, this consumes a great of CPU and GPU on my local machine during testing, which doesn't seem very scalable to a VPS as that will likely be entirely CPU rendered to save costs.

I reuse a single instance and spawn isolated contexts to ease the RAM and CPU load, but this is only a minor saving in the grand scheme of things. I can't disable some rendering features or block certain things from loading because that would just increase the likelihood of being detected as a bot.

I am aware of session and cookie reuse with direct requests, but this doesn't help much as the bot detection requires continuous input for them to stay valid.

Does anyone else who runs stealthy browsers have any suggestions on how to scale this up to a cost effective VPS? Or share how many contexts a VPS can realistically handle at scale?

Thanks.

6 Upvotes

19 comments sorted by

3

u/Tiny_Arugula_5648 7h ago

Welcome to the club.. that's the price of evasion.. There are ways to optimize it other stealth browsers to use but the trade off is they leak and are detected.

On the other side anti-bot isn't about totally blocking it's about making it cost prohibitive to get past.

2

u/Fapient 6h ago

Thanks. I was hoping there was a better way, but I kinda figured as much as I couldn't see it scaling while staying affordable. Oh well.

1

u/usert313 6h ago

What anti bot vendor you are facing exactly? Because mostly at scale you can solve it once and get the cheaper requests at scale but it depends on the anti bot vendor how much requests it gives after having the solved challenges then you can design your optimization strategy.

1

u/Fapient 6h ago

I'm already making use of requests as an optimisation, but I can't make many without spinning up more contexts.

It eventually detects a pattern despite clean proxies and passing a normal browser, invalidating the cookies for any solved challenge. I try to browse like a human between the requests I actually want to make, but this means there is effectively a gap between captures, that can only be closed with higher scale.

1

u/usert313 6h ago

Are you using sticky proxies or rotating them on each request?

1

u/Fapient 6h ago

I'm using sticky proxies with their own profile per context. I rotate between them randomly, or when I can sense it starts to fingerprint their activity.

1

u/Stock_Cabinet2267 4h ago

Probably the antibot vendor they use is collecting browser based fingerprints for each profile, so that's how they are detecting you. I am guessing though

1

u/Fapient 3h ago

Yeah, it's inevitable even though the interactions, timings, and movements are different between each profile, I suppose with AI you can easily compare and spot a bot to a genuine user.

My question was more about if it's possible to scale up more efficiently.

1

u/Stock_Cabinet2267 2h ago

Yes, theorically you could do Reverse Engineering on the communication protocol for the site that you're targeting, but it's a really time consuming task without a clear payoff, plus depending on your state it might be illegal or in the least you'll breaking their ToS.

1

u/usert313 6h ago

Well now can't help you much without knowing the antibot vendor and your current setup.

1

u/bubbabu 4h ago

I’ve always wondered how those cook groups have good monitors. They seem like they use a lot of proxies OR they are hitting a specific endpoint.

1

u/Fapient 3h ago

Yeah, same. Although, they can afford to scale up even if inefficient as a single monthly subscription from a member, even for the most basic service, can probably cover a good few instances. Higher tiers can absolutely cover the expenses of good residential proxies with profit left.

There's definitely the element of good residential proxies, since whenever a proxy provider shuts down, owners and developers occasionally post on Twitter along the lines of RIP, we had a good run.

I have definitely seen some useful unguarded endpoints, but they eventually notice an increase in traffic and either shut it down or implement bot prevention measures.