locustio / locust

Write scalable load tests in plain Python 🚗💨
MIT License
24.54k stars 2.96k forks source link

Cloudscraper implementation #2868

Open instc opened 3 weeks ago

instc commented 3 weeks ago

Prerequisites

Description

It would be great if we can use Cloudscraper to send requests that bypass cloudfalres's anti bot verification. Is that possible or implementable in the current version?

cyberw commented 3 weeks ago

I haven't done it but it sounds entirely doable! Either by implementing a new User class, or by just using it in a task and logging an event using measure https://docs.locust.io/en/stable/api.html#locust.event.EventHook.measure