dosage/dosagelib/plugins/comicpress.py

19 lines
468 B
Python
Raw Normal View History

2015-05-15 12:15:32 +00:00
# -*- coding: utf-8 -*-
from ..scraper import make_scraper, _ParserScraper
def add(name, url, firstUrl=None, lang=None):
attrs = dict(
name = name,
url = url,
imageSearch = '//div[@id="comic"]//img',
prevSearch = u'//a[text()=" Prev"]',
)
if lang:
attrs['lang'] = lang
if firstUrl:
attrs['firstUrl'] = url + firstUrl
globals()[name] = make_scraper(name, _ParserScraper, **attrs)
add('Hipsters', 'http://www.hipsters-comic.com/', 'comic/hip01/')