Warning
This currently doesn't work. The upstream API changed. See #2.
U Pull R Parts junkyard inventory scraped into RSS.
There's a scheduled (cron) job that runs daily at 9am UTC via a GitHub Actions pipeline. "Why 9am UTC?", you ask. Because, dear reader, it's early morning CT (3 or 4am, depending on the offset). This job does the following:
- Use the UPRP API to get the inventory as HTML, just like their website
curl 'https://upullrparts.com/wp-admin/admin-ajax.php' --compressed -X POST --data-raw 'action=getVehicles'
- Convert the HTML to Markdown, so each table row is a single line (makes diffing easier)
- Run a diff, deduplicating where necessary (reordered lines) to get the bare additions and removals
- Finesse that into a Markdown code fence as
diff
language stored in YYYY-MM-DD.md format - Re-build the RSS feed on the fly, converting the Markdown into HTML for the feed item body
The RSS lives at /feed.rss. You'd put this URL into your feed reader of choice. If you want a recommendation, I use Miniflux.
You can view the current inventory at /inventory and the changelog index at /changelog.
Me. It's licensed under MIT.
I wanted to see changes to the junkyard inventory real(ish) time, as well as historically.
Simon Willison for their article on scraping which I leveraged.