# -*- coding: utf-8 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper
from ..helpers import bounceStarter, queryNamer, indirectStarter
from ..util import tagre
from .common import _ComicControlScraper, _WordPressScraper, xpath_class
class PandyLand(_WordPressScraper):
url = 'http://pandyland.net/'
firstStripUrl = 'http://pandyland.net/1/'
class ParadigmShift(_BasicScraper):
url = 'http://www.paradigmshiftmanga.com/'
starter = indirectStarter
stripUrl = url + 'ps/%s.html'
imageSearch = compile(tagre("img", "src", r'([^"]*comics/ps/[^"]*)'))
prevSearch = compile(tagre("a", "href", r'([^"]+)',
after="previous-comic-link"))
latestSearch = compile(tagre("a", "href", r'([^"]+)',
after="next-comic-link"))
help = 'Index format: custom'
class ParallelUniversum(_BasicScraper):
url = 'http://www.paralleluniversum.net/'
rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '001-der-comic-ist-tot'
imageSearch = compile(tagre("img", "src",
r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s[^"]+/)' % rurl) +
tagre("span", "class", "prev"))
help = 'Index format: number-stripname'
lang = 'de'
class PartiallyClips(_WordPressScraper):
url = 'http://partiallyclips.com/'
firstStripUrl = url + 'comic/screaming-woman/'
class PastelDefender(_BasicScraper):
baseUrl = 'http://www.pasteldefender.com/'
url = baseUrl + 'coverbackcover.html'
stripUrl = baseUrl + '%s.html'
firstStripUrl = stripUrl % 'cover'
imageSearch = compile(r'.*]*prev_button\.gif')
nextSearch = compile(r'.*]*next_button\.gif')
help = 'Index format: n (unpadded)'
namer = queryNamer('comicid', use_page_url=True)
class Pimpette(_ParserScraper):
url = 'http://pimpette.ca/'
stripUrl = url + 'index.php?date=%s'
firstStripUrl = stripUrl % '20030905'
imageSearch = '//div[@id="strip"]/img'
prevSearch = '//a[text()="previous"]'
help = 'Index format: yyyymmdd'
class Pixel(_BasicScraper):
url = 'http://pixelcomic.net/'
rurl = escape(url)
stripUrl = url + '%s'
firstStripUrl = stripUrl % '000.shtml'
imageSearch = compile(tagre("img", "src", r'(\d+\.png)'))
prevSearch = compile(tagre("a", "href", r'(%s\d+\.(?:php|shtml))' % rurl,
before="prev"))
help = 'Index format: nnn'
class PlanescapeSurvival(_BasicScraper):
url = 'http://planescapecomic.com/'
stripUrl = url + '%s.html'
imageSearch = compile(r'src="(comics/.+?)"')
prevSearch = compile(r'