From 745bc217569cf2f81ecb74708c725b4ab53cdc25 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Tue, 29 Oct 2013 12:52:47 +0100 Subject: [PATCH] =?utf8?q?[server]=20jl8=20:=20BD=20h=C3=A9ros=20DC=20dans?= =?utf8?q?=20leur=20enfance?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- today_server.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/today_server.py b/today_server.py index 598a421..7e31652 100755 --- a/today_server.py +++ b/today_server.py @@ -139,6 +139,14 @@ def last_grenier(): titles = parse_youtube("joueurdugrenier") return len(titles) +def last_jl8(): + rss = urllib.urlopen("http://limbero.org/jl8/rss/") + t = rss.read() + x = etree.fromstring(t) + links = x.xpath("//link") + maxnum = links[1].text.split("/")[-1] + maxnum = int(maxnum) + return maxnum def get_file(): """Récupère la liste des derniers ids de chaque truc, stockée dans le fichier.""" @@ -164,6 +172,7 @@ FETCHS = { "norman" : last_norman, "cyprien" : last_cyprien, "grenier" : last_grenier, + "dc" : last_jl8, } def fetch_all(): -- 2.39.2