News for hackers. Stuff that matters.
Re:Creating an open-source solution to the headaches of head... by mrskitch on Tuesday November 26, 2019 @03:15PM (#21642206)
Just to follow up, you can use our /scrape API to do this:

curl -X POST \ https://chrome.browserless.io/scrape \ -H 'Content-Type: application/json' \ -d '{ "url": "https://reddit.com/", "elements": [{ "selector": "img" }] }'

This will get all the <img> tags on a page and return their attributes (which includes their sources). If you wanted to do scripts as well, just add a new object to the elements array with the "selector" of "script".

There are no comments on this comment yet.