dosage/dosagelib/plugins/q.py

26 lines
941 B
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2013-02-05 18:51:46 +00:00
# Copyright (C) 2012-2013 Bastian Kleineidam
2012-06-20 19:58:13 +00:00
from re import compile, escape
2012-10-11 10:03:12 +00:00
from ..scraper import _BasicScraper
2012-11-21 20:57:26 +00:00
from ..util import tagre
2012-06-20 19:58:13 +00:00
class QuestionableContent(_BasicScraper):
url = 'http://www.questionablecontent.net/'
stripUrl = url + 'view.php?comic=%s'
2012-12-07 23:45:18 +00:00
imageSearch = compile(tagre("img", "src", r'([^"]+/comics/[^"]+)', before="strip"))
prevSearch = compile(tagre("a", "href", r'(view\.php\?comic=\d+)') + 'Previous')
2012-06-20 19:58:13 +00:00
help = 'Index format: n (unpadded)'
class Qwantz(_BasicScraper):
baseurl = 'http://www.qwantz.com/'
url = baseurl + 'index.php'
rurl = escape(baseurl)
stripUrl = url + '?comic=%s'
imageSearch = compile(tagre("img", "src", r'(%s/comics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%sindex\.php\?comic=\d+)' % rurl, before="prev"))
2012-06-20 19:58:13 +00:00
help = 'Index format: n'