Fix Qwantz

This commit is contained in:
Tobias Gruetzmacher 2020-01-09 23:36:05 +01:00
parent 290f4167d9
commit e393ccdce1

View file

@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2017 Tobias Gruetzmacher
# Copyright (C) 2015-2020 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper
from ..util import tagre
from ..scraper import _ParserScraper
from ..helpers import xpath_class
class QuantumVibe(_ParserScraper):
@ -35,12 +34,10 @@ class QuestionableContent(_ParserScraper):
help = 'Index format: n (unpadded)'
class Qwantz(_BasicScraper):
baseUrl = 'http://www.qwantz.com/'
url = baseUrl + 'index.php'
rurl = escape(baseUrl)
class Qwantz(_ParserScraper):
url = 'http://www.qwantz.com/index.php'
stripUrl = url + '?comic=%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%sindex\.php\?comic=\d+)' % rurl, before="prev"))
imageSearch = '//img[{}]'.format(xpath_class('comic'))
prevSearch = '//a[@rel="prev"]'
help = 'Index format: n'