2 ms·
If you're interested in playing with Mozilla Readability.js from the command line I came up with this recipe using my shot-scraper tool the other day: https://
by simonw 5y ago
If you're interested in playing with Mozilla Readability.js from the command line I came up with this recipe using my shot-scraper tool the other day:
https://til.simonwillison.net/shot-scraper/readability https://til.simonwillison.net/shot-scraper/readability
pip install shot-scraper
shot-scraper install
shot-scraper javascript https://simonwillison.net/2022/Mar/24/datasette-061/ "
async () => {
const readability = await import('https://cdn.skypack.dev/@mozilla/readability');
return (new readability.Readability(document)).parse();
}"
- dotancohen 5y agoshot-scraper is terrific, thank you! Right now I'm using a bash script instead of YAML file for screenshotting multiple sites I maintain, as there is no option to add a timestamp to the filenames, something like this (simplified): declare -A capture capture[www.foo.com]=https://www.foo.com/ capture[www.foo.com-bar]=https://www.foo.com/bar for key in "${!capture[@]}" ; do shot-scraper ${capture[$key]} -o - > $key_$(date +"%Y-%m-%d_%H_%M") done Otherwise it is a terrific tool, able to screenshot websites that are otherwise very difficult due to CDNs, javascript, etc. Thank you very much!