2012-06-20 20:41:04 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2012-11-21 20:57:26 +00:00
|
|
|
# Copyright (C) 2012 Bastian Kleineidam
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2012-11-21 20:57:26 +00:00
|
|
|
from re import compile
|
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):
|
|
|
|
latestUrl = 'http://www.questionablecontent.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'view.php?comic=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'/(comics/\d+\.png)"')
|
|
|
|
prevSearch = compile(r'<a href="(view.php\?comic=\d+)">Previous')
|
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
|
|
|
class Qwantz(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.qwantz.com/index.php'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?comic=%s'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.qwantz\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.qwantz\.com/index\.php\?comic=\d+)', before="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n'
|