Yes: I find it surprising that this isn't a more widespread approach. It's how I've taught web scraping to my PhD students for some years. https://github.com/jawj/web-scraping-for-researchers
It’s not widespread because it’s much more complicated than making an http request and reading the results from the body. You don’t spin up a browser, much less the full GUI, unless it’s a last resort.
Web scraping with your web browser: Why not?
71–77 of 77 posts
Re: Web scraping with your web browser: Why not?
#72> So the question is: can you write a web scraper in your browser? The answer is: YES, you can! So why is nobody doing it? > One of the issues is what is called CORS (Cross-Origin Resource Sharing) which is a set of protocols which may forbid or allow access to a web resource by Javascript. There are two possible workarounds: a browser extension or a proxy server. The first choice is fairly limited since some securit…
Interesting, I’ve tried checkbot recently and it failed to do any cloudflare gated website, even 1 page. But maybe I’m on the old version
It is worrying what this means for the future for web crawlers in general though if most sites end up being gated to all bots that aren't from major search engines.
Re: Web scraping with your web browser: Why not?
#73Earlier quoted context omitted.
Apparently there is no web extension API to inspect the body of a fetch response and you have to override window.fetch Seems like an omission in the spec.
If we're talking about chrome extension, yes. But firefox extension expose API to inspect the response stream.
Re: Web scraping with your web browser: Why not?
#74This is my project for extracting my (your) webshop order & item data https://gitlab.com/Kagee/webshop-order-scraper
Re: Web scraping with your web browser: Why not?
#75I've read through that (hard to read, because of the bad formatting) but I still don't understand why you would do that instead of Playwright, Puppeteer etc. - The only reason seems to be "This technique certainly has its limits.".
>bad formatting If you can elaborate, I would very much appreciate it. I'm always interested in doing better. Why use Puppeteer etc. when you don't have to? What is the argument for using these additional tools versus not using them?