_re_wl_uri = re.compile(
'http://wolnelektury.pl/katalog/obraz/(?P<slug>[-a-z0-9]+)/?$'
)
-
- @classmethod
- def from_slug(cls, slug):
- uri = 'http://wolnelektury.pl/katalog/obraz/%s/' % slug
- return cls(uri)
+ template = 'http://wolnelektury.pl/katalog/obraz/%s/'
def as_wlpictureuri_strict(text):
clip = self.get_sem_coords(k)
self.frame = clip
frm = Element("sem", {"type": "frame"})
- frm.append(k.iter("div").next())
+ frm.append(next(k.iter("div")))
self.edoc.getroot().append(frm)
k.getparent().remove(k)
else: