3 ms·
It would be cool if the DOM was exposed. Then you could write one liner bash scripts to do simple tasks like “download all images” or “delete script tags refere
by aljungberg 6y ago
It would be cool if the DOM was exposed. Then you could write one liner bash scripts to do simple tasks like “download all images” or “delete script tags referencing spammyads.js”, all with nothing more advanced than find, cp, rm and mv in the shell. E.g.
cp html/body/*/img/.hero-img/hello.png ~Downloads/
You would need some clever way to express the DOM with ids and classes etc but it could be done with some subdirectory structure and long names, sometimes having multiple names for the same thing.
- bakoo 6y agoCool idea, but I'd worry about all the malformed markup.
- dotancohen 6y agoI'm finding malformed markup has not been a concern of mine for many years. It used to be bad, real bad, but now I cannot think of the last time that I had to deal with malformed markup while scraping.
- cldellow 6y agoThat's a good concern, but I think we can happily ignore it. The DOM represents the tree structure derived from the markup by the browser, so dealing with malformed markup wouldn't be the problem of this extension, it'd be the problem of the browser it's integrating in to.
- OOPMan 6y agoThis is exactly the kind of dumb idea I expected to see on HN