Skip to content

Latest commit

 

History

573 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇨🇿 czech-political-parties

Tracking changes in Czech political parties:

Inspired by @simonw's git scraping article and this tweet. I noticed there is a registry of all political parties and movements in the Czech Republic, and that for journalists it's sometimes useful to monitor it for changes. Hence I decided to scrape the registry and have it as a git scraping pet project.

The scraper uses my favorite Scrapy framework. So far I scrape only a few fields. If you want to build on top of the data and you're missing something, let me know in issues. The data is sorted by registration date, so that the newest parties and movements are at the top of the file.

If you just need the raw registry data, you may not need this project at all: the Ministry publishes it as official open data — a machine-readable dataset at /app/opendata/boards/SPS (described by its metadata, updated hourly). What this project adds on top are two fields the open data doesn't expose: whether each record is a party or a movement (type), and whether it's still active (is_active).

That's also how the scraper works. It takes the bulk of the data from that open-data dataset — a single, official request — and enriches it with type and is_active from the registry's RSC (React Server Components) list endpoint, requested via the RSC header and read out of the React Flight payload it returns. Leaning on the open data keeps things resilient: the RSC endpoint is an internal implementation detail of the website that can change without notice, while the open data is a documented, stable interface.

I'm curious what changes I'm about to see!

About

Tracking changes in Czech political parties

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Contributors

Languages