]> gitweb.pimeys.fr Git - today.git/blobdiff - today_server.py
Modularisation++ : module comics pour xkcd et jl8 (young DC)
[today.git] / today_server.py
index 1727e27d5a19b6ecb164fd0929117851471cf48f..0c5016048f04f009ed06e71982598bbd0a1dd543 100755 (executable)
@@ -24,12 +24,6 @@ import serverconfig
 #: Récupération de toutes les nouveautés
 import gather
 
-def last_xkcd():
-    p = urllib.urlopen("http://xkcd.com")
-    t = p.read()
-    current_id = int(re.findall("Permanent link to this comic: http://xkcd.com/(.*?)/", t)[0])
-    return current_id
-
 def last_xantah():
     p = urllib.urlopen("http://www.adoprixtoxis.com/lite/download/xantah_downloads.php")
     t = p.read()
@@ -37,15 +31,6 @@ def last_xantah():
     ids = [int(i) for i in ids]
     return max(ids)
 
-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."""
     f = open(serverconfig.store_published_file)
@@ -60,9 +45,7 @@ def update_file(news):
     f.close()
 
 FETCHS = {
-          "xkcd" : last_xkcd,
           "xantah" : last_xantah,
-          "dc" : last_jl8,
          }
 
 def fetch_all():