vittorianicolosi1994
Regular Member
- Jan 17, 2024
- 279
- 81
:
---
I'm trying to scrape data from a website using ChromeDriver and Selenium, but the site has anti-bot detection. I successfully scraped data once on my PC, but after that, I can no longer scrape due to the anti-bot mechanism, even with a 4G mobile IP. I tried using a new PC and a 4G connection, and it worked again, but after that, the anti-bot measures kicked in again.
To work around this, I tried using a VPS online, but I still can't scrape because of the anti-bot detection. The issue seems to be how to change the user agent in headless mode. Unfortunately, I don't have access to the source code of the scraping bot, only the executable (.exe).
I found this solution online for changing the user agent: {chrome:headless:userAgent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36}. How can I implement this if I don’t have access to the source code?
---
---
I'm trying to scrape data from a website using ChromeDriver and Selenium, but the site has anti-bot detection. I successfully scraped data once on my PC, but after that, I can no longer scrape due to the anti-bot mechanism, even with a 4G mobile IP. I tried using a new PC and a 4G connection, and it worked again, but after that, the anti-bot measures kicked in again.
To work around this, I tried using a VPS online, but I still can't scrape because of the anti-bot detection. The issue seems to be how to change the user agent in headless mode. Unfortunately, I don't have access to the source code of the scraping bot, only the executable (.exe).
I found this solution online for changing the user agent: {chrome:headless:userAgent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36}. How can I implement this if I don’t have access to the source code?
---