The other day I needed to build a small web scraper to get new listings from a local real-estate website and store them somewhere I could easily fetch them.
Previously I had built a similar solution on a long-running Digital Ocean droplet and stored the listings in a plain JSON file. Obviously that was less than ideal setup, since the server was doing nothing most of the time, and it was a hassle to actually fetch the data.
I decided this was a good chance to get to know Supabase Edge functions a bit better and utilize the Postres pg_cron
extension to periodically trigger the function.
Let's get started.