# -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2017 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from re import compile from six.moves.urllib.parse import urljoin from ..helpers import bounceStarter, xpath_class from ..scraper import _BasicScraper, _ParserScraper from ..util import tagre from .common import _WordPressScraper class RadioactivePanda(_BasicScraper): url = 'http://www.radioactivepanda.com/' stripUrl = url + 'comic/%s' imageSearch = compile(r' 2 and self.chapter == 1 and name != 'through-the-woods': page[0] = page[0][:2] + '-' + page[0][2:] name = '%d-%s-%s.%s' % (self.chapter, page[0], name, page[1]) if pageUrl in self.startOfChapter: self.chapter -= 1 return name class RomanticallyApocalyptic(_ParserScraper): url = 'http://romanticallyapocalyptic.com/' stripUrl = url + '%s' firstStripUrl = stripUrl % '0' imageSearch = '//div[%s]/center//img' % xpath_class('comicpanel') prevSearch = '//a[@accesskey="p"]' help = 'Index format: n' adult = True class Roza(_ParserScraper): url = 'http://www.junglestudio.com/roza/index.php' stripUrl = url + '?date=%s' firstStripUrl = stripUrl % '2007-05-01' imageSearch = '//img[contains(@src, "pages/")]' prevSearch = '//a[img[contains(@src, "navtable_01.gif")]]' help = 'Index format: yyyy-mm-dd' class Ruthe(_BasicScraper): url = 'http://ruthe.de/' stripUrl = url + 'cartoon/%s/datum/asc/' firstStripUrl = stripUrl % '1' lang = 'de' imageSearch = compile(tagre("img", "src", r'(/?cartoons/strip_\d+[^"]+)')) prevSearch = compile(tagre("a", "href", r'(/cartoon/\d+/datum/asc/)') + 'vorheriger') help = 'Index format: number'