]>
gitweb.pimeys.fr Git - today.git/blob - comics.py
2 # -*- encoding: utf-8 -*-
4 """ Gathering des webcomics """
11 p
= urllib
.urlopen("http://xkcd.com")
13 current_id
= int(re
.findall("Permanent link to this comic: http://xkcd.com/(.*?)/", t
)[0])
17 rss
= urllib
.urlopen("http://limbero.org/jl8/rss/")
19 x
= etree
.fromstring(t
)
20 links
= x
.xpath("//link")
21 maxnum
= links
[1].text
.split("/")[-1]