shot-scraper 1.8. I've added a new feature to shot-scraper that makes it easier to share scripts for other people to use with the shot-scraper javascript command.
shot-scraper javascript
lets you load up a web page in an invisible Chrome browser (via Playwright), execute some JavaScript against that page and output the results to your terminal. It's a fun way of running complex screen-scraping routines as part of a terminal session, or even chained together with other commands using pipes.
The -i/--input
option lets you load that JavaScript from a file on disk - but now you can also use a gh:
prefix to specify loading code from GitHub instead.
To quote the release notes:
shot-scraper javascript
can now optionally load scripts hosted on GitHub via the newgh:
prefix to theshot-scraper javascript -i/--input
option. #173Scripts can be referenced as
gh:username/repo/path/to/script.js
or, if the GitHub user has created a dedicatedshot-scraper-scripts
repository and placed scripts in the root of it, usinggh:username/name-of-script
.For example, to run this readability.js script against any web page you can use the following:
shot-scraper javascript --input gh:simonw/readability \ https://simonwillison.net/2025/Mar/24/qwen25-vl-32b/
The output from that example starts like this:
{
"title": "Qwen2.5-VL-32B: Smarter and Lighter",
"byline": "Simon Willison",
"dir": null,
"lang": "en-gb",
"content": "<div id=\"readability-page-1\"...
My simonw/shot-scraper-scripts repo only has that one file in it so far, but I'm looking forward to growing that collection and hopefully seeing other people create and share their own shot-scraper-scripts
repos as well.
This feature is an imitation of a similar feature that's coming in the next release of LLM.
Recent articles
- Putting Gemini 2.5 Pro through its paces - 25th March 2025
- New audio models from OpenAI, but how much can we rely on them? - 20th March 2025
- Calling a wrap on my weeknotes - 20th March 2025