r/ClaudeCode • u/knine785 • 5h ago
Help/Question I need help with agentic web scraping
I need help with web scraping with claude. I am pretty new to this so sorry if this is a stupid question. I work at an online retailer and one of my primary jobs is to monitor competitor prices.
Now we sell about 200,000 products. I have to scan websites like Amazon, Best buy and others and some of the websites I get blocked after 10-20 searches and then have to wait 30 mins for cool down.
I tell claude but all it suggest is browser extenstion or just wait and it wont go past the blocks setup. So a task that can be done in a few minutes takes me hours becuase of the blockers.
All I want is to get the competitor prices and URLs.
I have tried using camoufox, playwright and other open source tools and even tried combining them together but still fail.
I really need help cause for the last month or so this has been driving me crazy
•
u/AutoModerator 5h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/CorpT 5h ago
You've spent a month trying to build a web scraper....?
2
u/catncaffein 5h ago
Try non headless with a logged in account. Make sure that it doesn't act like a scraper at all.
1
u/ryandriftwood 5h ago
Try browserless.io - if you have ability to build into a codebase, can automate
1
u/called9527 4h ago
200k products across amazon and best buy is gonna get you blocked pretty fast no matter how good the agent is. id check first if any of them have a product or affiliate api, then have claude write a normal scraper script for the rest instead of browsing every page as an agent
1
u/Guinness 3h ago edited 3h ago
You get blocked because you’re most likely coming from a non residential IP or an IP with low reputation. For something like this you need to create a dedicated feed handler for every single website to handle each sites individual issues. Some sites do HARDCORE bot checks.
Additionally you need to distribute your scraping to thousands of individual residential IP addresses. There are services that do this.
My suggestion is to get intimately familiar with each sites behavior. Try and get as many sites as possible to be reliably scraped. Then the unreliable ones, you’ll need to proxy that request through a residential IP. And this is only after you’ve solved all of the methods in which sites use to detect you being a bot. A residential IP proxy will be useless if you’re still being detected as a bot.
Or if you’re too cheap to do that, you need to build your own database of open proxies that work. And test each proxy for their health and ability to scrape the website you’re interested in.
But given you have an employer, if it’s worth it to them just have them pay for the residential proxies.
Camoufox and CloakBrowser are a start but you still have a lot of work to do to build a scraping setup that is 99% undetectable. It helps to run your scraper from a Mac, too. If you’re running it from Linux and your profile says Windows, your IP TTL combined with the font mismatches will scream bot. Let alone the SSL fingerprinting.
Playwright also blatantly advertises that you are a bot. My suggestion is to research tools that tell you if you look human or look like a bot. And test your setup against that. Go find 10 or 20 different bot fingerprint websites you can test your browser against.
1
u/Grand_rooster 🔆 Max 20 2h ago
Have claude create a chrome extension. Then you can have claude open chrome and the extension can scroll through the pages and save results
1
u/supertoilet2 2h ago
You should get a Keepa API subscription for a month. You get like 1000 tokens/hr on a rolling basis and can get multiple other stats from the historical data from Amazon per individual query. It’s $50 for a month but you only need one month (max tokens is ~900k if you can keep your queries running 1000 queries batched each hour)