shot-scraper
sbts-aru
shot-scraper | sbts-aru | |
---|---|---|
16 | 22 | |
1,535 | 92 | |
- | - | |
7.1 | 9.4 | |
about 1 month ago | 2 months ago | |
Python | Shell | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
shot-scraper
-
I want to create IMDB for Open source projects
I had one of these recently! https://github.com/simonw/shot-scraper/pull/133/files
They're /incredibly/ rare though.
-
2024-03-01 listening in on the neighborhood
If anyone wants the raw data, it's available in window._Flourish_data variable on https://flo.uri.sh/visualisation/16818696/embed
Which means you can extract it with my https://shot-scraper.datasette.io/ tool like this:
shot-scraper javascript \
-
Web Scraping in Python – The Complete Guide
I strongly recommend adding Playwright to your set of tools for Python web scraping. It's by far the most powerful and best designed browser automation tool I've ever worked with.
I use it for my shot-scraper CLI tool: https://shot-scraper.datasette.io/ - which lets you scrape web pages directly from the command line by running JavaScript against pages to extract JSON data: https://shot-scraper.datasette.io/en/stable/javascript.html
- A command-line utility for taking automated screenshots of websites
-
Don’t Build a General Purpose API to Power Your Own Front End (2021)
This is exactly what the `Accept` HTTP header is for https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...
I think the author is generally correct that all JSON should be provided in a single request, but if you want to prove it, then you should be able to change your accept header to and from `application/json`/`text/html seeing nearly identical data.
In fact, this is what both GitLab and Github do. Try it out!
`curl -L https://github.com/simonw/shot-scraper` (text/html)
`curl --header "Accept: application/json" -L https://github.com/simonw/shot-scraper` (application/json)
-
Git scraping: track changes over time by scraping to a Git repository
Git is a key technology in this approach, because the value you get out of this form of scraping is the commit history - it's a way of turning a static source of information into a record of how that information changed over time.
I think it's fine to use the term "scraping" to refer to downloading a JSON file.
These days an increasing number of websites work by serving up JSON which is then turned into HTML by a client-side JavaScript app. The JSON often isn't a formally documented API, but you can grab it directly to avoid the extra step of processing the HTML.
I do run Git scrapers that process HTML as well. A couple of examples:
scrape-san-mateo-fire-dispatch https://github.com/simonw/scrape-san-mateo-fire-dispatch scrapes the HTML from http://www.firedispatch.com/iPhoneActiveIncident.asp?Agency=... and records both the original HTML and converted JSON in the repository.
scrape-hacker-news-by-domain https://github.com/simonw/scrape-hacker-news-by-domain uses my https://shot-scraper.datasette.io/ browser automation tool to convert an HTML page on Hacker News into JSON and save that to the repo. I wrote more about how that works here: https://simonwillison.net/2022/Dec/2/datasette-write-api/
- Web Scraping via JavaScript Runtime Heap Snapshots (2022)
-
Need help with downloading a section of multiple sites as pdf files.
You can use shot-scraper: https://github.com/simonw/shot-scraper
-
Ask HN: Small scripts, hacks and automations you're proud of?
I have a neat Hacker News scraping setup that I'm really pleased with.
The problem: I want to know when content from one of my sites is submitted to Hacker News, and keep track of the points and comments over time. I also want to be alerted when it happens.
Solution: https://github.com/simonw/scrape-hacker-news-by-domain/
This repo does a LOT of things.
It's an implementation of my Git scraping pattern - https://simonwillison.net/2020/Oct/9/git-scraping/ - in that it runs a script once an hour to check for more content.
It scrapes https://news.ycombinator.com/from?site=simonwillison.net (scraping the HTML because this particular feature isn't supported by the Hacker News API) using shot-scraper - a tool I built for command-line browser automation: https://shot-scraper.datasette.io/
The scraper works by running this JavaScript against the page and recording the resulting JSON to the Git repository: https://github.com/simonw/scrape-hacker-news-by-domain/blob/...
That solves the "monitor and record any changes" bit.
But... I want alerts when my content shows up.
I solve that using three more tools I built: https://datasette.io/ and https://datasette.io/plugins/datasette-atom and https://datasette.cloud/
This script here runs to push the latest scraped JSON to my SQLite database hosted using my in-development SaaS platform, Datasette Cloud: https://github.com/simonw/scrape-hacker-news-by-domain/blob/...
I defined this SQL view https://simon.datasette.cloud/data/hacker_news_posts_atom which shows the latest data in the format required by the datasette-atom plugin.
Which means I can subscribe to the resulting Atom feed (add .atom to that URL) in NetNewsWire and get alerted when my content shows up on Hacker News!
I wrote a bit more about how this all works here: https://simonwillison.net/2022/Dec/2/datasette-write-api/
-
Show HN: Plus – Self Updating Screenshots
Sounds a lot like Simon Willison's open source project shot-scraper
https://github.com/simonw/shot-scraper
sbts-aru
-
Going in circles without a real-time clock
Unfortunately a Raspberry Pi is a bit ill suited for production environments. Id recommend an RTC module. Otherwise this might be helpful: https://github.com/hcfman/sbts-aru
-
Running a Raspberry Pi with a read-only root filesystem
If you install my sbts-aru project
https://github.com/hcfman/sbts-aru
It will shrink your partitions, add news and install one of these and set up a sub micro second system clock and an audio recorder suitable for sound localization with a single install command.
-
2024-03-01 listening in on the neighborhood
I recommend primo EM272 microphone capsules for use with https://github.com/hcfman/sbts-aru. They are high quality, very sensitive with high signal to noise ratio, lauded for nature recording use cases. They can be bought assembled for around 65 euros in the Netherlands. However these capsules are often found in much more expensive equipment.
-
Considerations for a long-running Raspberry Pi
My sound localizing Raspberry Pi installs a resilient base system as part of its install.
https://github.com/hcfman/sbts-aru
https://hackaday.com/2023/12/30/localizing-fireworks-launche...
With one command it for all Pi’s for both Raspbian and bookworm it:
* Shrinks the file system (Gee, how does it do that with just one disk ? ;-) )
-
Colorado wolf reintroduction to move forward as ranchers' legal effort fails
I have a sound localization project that can help with that
https://github.com/hcfman/sbts-aru
You need to be able to hear the sound from three or more recorders. And normally localization is better within the polygon of microphones but there’s an area of better localizability extending outside of a vertex.
-
Acoustic Location and Sound Mirrors
Interesting history!
And while we are in the subject of sound localizing may I take the liberty of introducing my new raspberry pi sound localizing audio recorder.
https://github.com/hcfman/sbts-aru
It installs with one command on all Raspberry Pi versions and synchronizes the system time to less than 1 microsecond of error with a cheap GPS.
With three of these I’ve been able to sound localize the explosions from illegal fireworks to a specific car park from more than 3km away with lots of houses in between.
When I got to the car park I could smell the sulphur from the fireworks.
This will even run on a Raspberry Pi zero running of a battery with a 6 euro neo 7m gps and a 6 euro usb mic.
-
AI tool helps ecologists monitor rare birds through their songs
Very nice tool!
So grab a spare Raspberry Pi, a GPS, a cheap USB sound card and a mic and get recording with this Pi based Acoustic Recording Unit
https://github.com/hcfman/sbts-aru
And while you are at it, install 3x or more and localize where the birds are.
-
Ask HN: Comment here about whatever you're passionate about at the moment
Sound localizing. I was intensely passionate about it when I saw the possibility to do it well on a Raspberry Pi. There were quite a few more problems than so expected which is why it took five months (of weekends) to complete it well.
But I’m super happy with the result and have a bunch of geeks with recording nodes setup a long distance apart. Localizing large explosions show that it’s possible to localize to a carpets even when some of the nodes are almost 5 away.
For those interested, here is the project:
https://github.com/hcfman/sbts-aru
- Localizing sound sources on a Pi anyone?
- Raspberry Pi based sound localizing audio recorder
What are some alternatives?
gmail-sidebar-drive - A simple gmail add on to display all the drive folders and files in sidebar.
al-ahli-hospital-blast
zettelkasten - Creating notes with the zettelkasten note taking method and storing all notes on github
BirdNET-Pi - A realtime acoustic bird classification system for the Raspberry Pi 4B, 3B+, and 0W2 built on the TFLite version of BirdNET.
scrape-san-mateo-fire-dispatch
Bitgrid - Bitgrid - a new model of computation
bbcrss - Scrapes the headlines from BBC News indexes every five minutes
random-ideas - random ideas
scrape-hacker-news-by-domain - Scrape HN to track links from specific domains
logseq-sync - An open-source Logseq Sync backend implementation
SeleniumBase - 📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
vimium - The hacker's browser.