Related to this: you can also use my shot-scraper tool to scrape web pages from the command line using JavaScript:
% pip install shot-scraper
% shot-scraper install
% shot-scraper javascript https://datasette.io/ "({
title: document.title,
tagline: document.querySelector('.tagline').innerText
})"
{
"title": "Datasette: An open source multi-tool for exploring and publishing data",
"tagline": "An open source multi-tool for exploring and publishing data"
}
More here, including an example of using it to scrape data from Hacker News that's not available in the API: https://simonwillison.net/2022/Mar/14/scraping-web-pages-sho...HN post about this from yesterday (which failed to get any traction): https://news.ycombinator.com/item?id=30667588