# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper
from ..helpers import bounceStarter, queryNamer, indirectStarter
from ..util import tagre
class ParadigmShift(_BasicScraper):
url = 'http://www.paradigmshiftmanga.com/'
starter = indirectStarter(url, compile(tagre("a", "href", r'([^"]+)', after="next-comic-link")))
stripUrl = url + 'ps/%s.html'
imageSearch = compile(tagre("img", "src", r'([^"]*comics/ps/[^"]*)'))
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="previous-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(_BasicScraper):
url = 'http://partiallyclips.com/'
rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2001/10/28/screaming-woman'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class PastelDefender(_BasicScraper):
baseUrl = 'http://www.pasteldefender.com/'
url = baseUrl + 'coverbackcover.html'
stripUrl = baseUrl + '%s.html'
firstStripUrl = stripUrl % 'cover'
imageSearch = compile(r'.*]*next_button\.gif'))
stripUrl = url + '?comicid=%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(http://www\.phdcomics\.com/comics/archive/phd\d+s\d?\.\w{3,4})', quote=""))
prevSearch = compile(r'.*]*prev_button\.gif')
help = 'Index format: n (unpadded)'
namer = queryNamer('comicid', usePageUrl=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 PlanescapeSurvival(_BasicScraper):
url = 'http://planescapecomic.com/'
stripUrl = url + '%s.html'
imageSearch = compile(r'src="(comics/.+?)"')
prevSearch = compile(r']+?>]+?src="/previouscomic.gif">')
help = 'Index format: yyyymmdd'
class PvPonline(_BasicScraper):
url = 'http://pvponline.com/comic'
stripUrl = url + '%s'
imageSearch = compile(tagre("img", "src", r'(http://s3[^"]+\.amazonaws\.com/pvponlinenew/img/comic/\d+/\d+/pvp[^"]+\.jpg)'))
prevSearch = compile(tagre("a", "href", r'(/comic/[^"]+)', after="left divider"))
help = 'Index format: yyyy/mm/dd/stripname'