Goal
Automate discovery and collection of all ZIP URLs from the Frontex Public Register of Documents (SIR section), instead of maintaining zip_urls.txt manually.
Implementation
Script: fetch_sir_zip_urls.py
How it works:
- Iterates all listing pages at
https://prd.frontex.europa.eu/?form-fields[document-tag][0]=409&form-fields[paged]=N
- Extracts
document-post-id from each entry
- Fetches each dialog page (
dialog.php?card-post-id=2722&document-post-id=<ID>) to extract ZIP URL from <select option value>
- Appends only new URLs to
zip_urls.txt (idempotent, safe for cron)
Usage:
# Dry run (no writes)
uv run python3 fetch_sir_zip_urls.py --dry-run
# Append new URLs to zip_urls.txt
uv run python3 fetch_sir_zip_urls.py
TODOs
Goal
Automate discovery and collection of all ZIP URLs from the Frontex Public Register of Documents (SIR section), instead of maintaining
zip_urls.txtmanually.Implementation
Script:
fetch_sir_zip_urls.pyHow it works:
https://prd.frontex.europa.eu/?form-fields[document-tag][0]=409&form-fields[paged]=Ndocument-post-idfrom each entrydialog.php?card-post-id=2722&document-post-id=<ID>) to extract ZIP URL from<select option value>zip_urls.txt(idempotent, safe for cron)Usage:
TODOs
zip_urls.txt--date-fromfilter to limit to recent documents