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