Add RSS feed generator for commune de Silly (actualites + agenda)

Scrapes the imio.smartweb JSON API used by www.silly.be (found via the
smartweb-news/smartweb-events web components in the raw HTML) instead of
needing a headless browser. Shells out to curl since Cloudflare silently
blocks Python's urllib/requests TLS fingerprint. Includes Yunohost cron
and nginx deployment snippets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
para
2026-09-25 21:36:39 +02:00
co-authored by Claude Sonnet 5
commit ecf9baaa4d
5 changed files with 298 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# Extrait nginx pour servir les flux RSS generes par silly_rss.py.
#
# Sur Yunohost, chaque domaine a son propre dossier de fragments de conf,
# automatiquement inclus par le nginx gere par Yunohost :
# /etc/nginx/conf.d/<votre-domaine>.d/
#
# Installation :
# 1. Copier ce fichier vers :
# /etc/nginx/conf.d/<votre-domaine>.d/silly-rss.conf
# 2. Adapter le chemin "alias" ci-dessous si besoin.
# 3. Tester puis recharger nginx :
# sudo nginx -t && sudo systemctl reload nginx
#
# Les flux seront alors accessibles en :
# https://<votre-domaine>/silly-rss/actualites.xml
# https://<votre-domaine>/silly-rss/agenda.xml
location ^~ /silly-rss/ {
alias /var/www/silly-rss/;
autoindex off;
location ~ \.xml$ {
add_header Content-Type "application/rss+xml; charset=utf-8";
add_header Cache-Control "public, max-age=300";
}
# Bloque tout ce qui n'est pas un flux XML (script, log, etc.)
location ~ \.(py|log|pyc)$ {
deny all;
return 404;
}
}