dosage/dosagelib/plugins/webcomiceu.py

27 lines
838 B
Python
Raw Normal View History

2012-12-07 23:45:18 +00:00
# -*- coding: iso-8859-1 -*-
2013-02-05 18:51:46 +00:00
# Copyright (C) 2012-2013 Bastian Kleineidam
2012-12-07 23:45:18 +00:00
from re import compile
from ..scraper import make_scraper
from ..util import tagre
_prevSearch = compile(tagre("a", "href", r'(\?id=\d+)') + tagre("img", "src", r'images/navi-zurueck\.gif'))
_imageSearch = compile(tagre("img", "src", r'([^"]+/img/comic/[^"]+)', after="comicimg"))
def add(name, shortname):
url = 'http://%s.webcomic.eu/' % shortname
2012-12-07 23:45:18 +00:00
classname = 'WebcomicEu_%s' % name
globals()[classname] = make_scraper(classname,
name = 'WebcomicEu/' + name,
url = url,
stripUrl = url + '?id=%s',
2012-12-07 23:45:18 +00:00
imageSearch = _imageSearch,
prevSearch = _prevSearch,
help = 'Index format: number',
)
add('TheBessEffect', 'thebesseffect')
add('TheBessEffectEnglish', 'tbe-english')
add('Talandor', 'talandor')