r/ClaudeCode • u/nasanu • 1d ago
Help/Question Best web scrape results?
I am trying to automate content for generic things, say for example TVs. If I want an app that lists ALL TVs on the market complete with specs, what do you think is the best approach?
I already have something working, but its not amazing. Its gets the majority of things but misses some brands altogether and specs are hit and miss. Right now it's just running haiku with a prompt of like "find all brands manufacturing or selling as their own X" or "find and return full specs for X". It doesn't always work and returns different things each search. Specs are always the same when returned, but getting them returned is random and images for products returned seems to be random also. The images are always correct, but just different ones all the time.
I am thinking of switching to exa?... But that doesn't seem to return images. Right now I am thinking of running an exa search (monitoring?), then feeding that to haiku to sort it and collect images?..
What is the best approach? Keeping in mind that at any time any company might release something and I want the script to pick up anything new without pre knowledge of it. That bit is particularly tough as right now its still missing some major brands and releases somehow let alone finding new obscure stuff.
•
u/AutoModerator 1d 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.
4
u/rbatista191 1d ago
exa won't fix the missing brands. it searches by meaning over its own index, and in our test of 500 queries its top 10 shared only 32% of urls with google's. it also returns none of google's shopping units, which is where products show up with images and prices. google showed one on 14% of those queries, and brave, tavily and perplexity returned none either.
for "every tv on the market" I'd stop asking an llm to discover. pull google shopping results through a serp api (serpapi, oxylabs and cloro all return them) plus a few big retailers' category pages, dedupe on model number, and use haiku only to clean up specs.
for new releases, run a daily news query per brand and diff against your list.
2
u/Aggravating-Peak2639 1d ago
Firecrawl?
2
u/veganwurst 1d ago
The randomness is the clue: you're asking a model to search and remember in one step, so each run samples a different slice of the web. I'd split it into three jobs that each have a fixed answer:
The "always correct but different images" problem goes away too once you take the images from the product page itself instead of from a search result.
I work at DeepScout, which does steps 2 and 3 for online stores: you give it a store URL and get every product with specs and images in one schema, and you can drive it from Claude Code over MCP. It won't do step 1, finding brands you don't know about yet is still a search problem. In case it's useful: exporting a store's whole catalog
1
u/mkotsollaris 23h ago
Since the specs come back fine once it finds a product, i'd stop asking the model to discover products at all and treat it as a crawl. Boutique brands almost always have their own store, and a lot of them run on Shopify, so /products.json plus the sitemap gives you the whole catalog with images in one go, no search needed. For the non Shopify ones the product pages usually carry schema.org Product JSON-LD, and if you take the image from there (or og:image) you get the same one every run instead of whatever haiku grabs. How are you finding the brands in the first place, retailer lists or just search?
1
u/IllustriousSalad6201 21h ago
your clarification about boutique products changes this quite a bit. a search result list can miss a whole manufacturer without telling you anything is missing. i'd keep a separate manufacturer directory, adding candidates from niche publications and trade-show exhibitor lists, then monitor each confirmed manufacturer's catalogue. keep the source page attached to every spec, and select the main image from that product page consistently. you still won't prove completeness, but you'll know which brands you actually checked.
1
u/AdLow1228 1d ago
You'll need to get Claude to make you a web scraping backend instead of relying on Claude to grab the data from multiple websites, the companies news pages, tv news pages, stores you'd buy them from, ECT stuffs like that
Then have another agent reviewing data collected for relevance and any times sources say different stats, ECT
Then have it on a webUI or accessible via whatever your preferred method is
It's what I did for property searching earlier this year
Or find a service that supplies this data, can also ask Claude to research for that
1
u/Test_NPC 1d ago
You have to break up deterministic logic from indeterministic logic.
Programs can be written once and work for a very long time. They work the same way, every single time (excluding external factors like rate limiting). They are deterministic.
LLMs are not deterministic, but they are great at writing programs or doing one-off dynamic searches. So generally you tell the LLM to walk through the search and write a program to automate it for every followup search.