dosage/dosagelib/plugins/comicpress.py

22 lines
783 B
Python
Raw Normal View History

2015-05-15 12:15:32 +00:00
# -*- coding: utf-8 -*-
from ..scraper import make_scraper, _ParserScraper
2015-05-20 11:56:49 +00:00
2015-05-15 12:15:32 +00:00
def add(name, url, firstUrl=None, lang=None):
2015-05-20 11:56:49 +00:00
attrs = dict(
name=name,
url=url,
imageSearch='//div[@id="comic"]//img',
prevSearch=['//a[contains(text(), " Prev")]', "//a[contains(concat(' ', @class, ' '), ' navi-prev ')]"]
)
if lang:
attrs['lang'] = lang
if firstUrl:
attrs['firstUrl'] = url + firstUrl
globals()[name] = make_scraper(name, _ParserScraper, **attrs)
2015-05-15 12:15:32 +00:00
2015-05-20 11:16:54 +00:00
add('CourtingDisaster', 'http://www.courting-disaster.com/', 'comic/courting-disaster-17/')
2015-05-20 11:50:18 +00:00
add('OnTheEdge', 'http://ontheedgecomics.com/', 'comic/ote0001/')
2015-05-20 11:56:49 +00:00
add('PandyLand', 'http://pandyland.net/', '1/')
2015-05-20 11:50:18 +00:00
add('Hipsters', 'http://www.hipsters-comic.com/', 'comic/hip01/')