2012-12-07 23:45:18 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
2014-01-05 15:50:57 +00:00
|
|
|
# Copyright (C) 2012-2014 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):
|
2013-02-04 20:00:26 +00:00
|
|
|
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,
|
2013-02-04 20:00:26 +00:00
|
|
|
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')
|