Add site engine for RHJunior and migrate existing comics

This commit is contained in:
Techwolf 2019-07-12 22:35:14 -07:00 committed by Tobias Gruetzmacher
parent 0fed6c2c36
commit 3503a2bede
4 changed files with 36 additions and 25 deletions

View file

@ -731,6 +731,7 @@ class Renamed(Scraper):
cls('OnTheFasttrack', 'ComicsKingdom/OnTheFastrack'), cls('OnTheFasttrack', 'ComicsKingdom/OnTheFastrack'),
cls('PetiteSymphony/Djandora', 'ComicsBreak/Djandora'), cls('PetiteSymphony/Djandora', 'ComicsBreak/Djandora'),
cls('PetiteSymphony/Generation17', 'ComicsBreak/Generation17'), cls('PetiteSymphony/Generation17', 'ComicsBreak/Generation17'),
cls('QuentynQuinnSpaceRanger', 'RHJunior/QuentynQuinnSpaceRanger'),
cls('ShermansLagoon', 'ComicsKingdom/ShermansLagoon'), cls('ShermansLagoon', 'ComicsKingdom/ShermansLagoon'),
cls('SmackJeeves/CityFolk', 'ComicFury/CityFolk'), cls('SmackJeeves/CityFolk', 'ComicFury/CityFolk'),
cls('SmackJeeves/DoomsdayMyDear', 'DoomsdayMyDear'), cls('SmackJeeves/DoomsdayMyDear', 'DoomsdayMyDear'),
@ -740,6 +741,8 @@ class Renamed(Scraper):
cls('SmackJeeves/Magience', 'ComicFury/Magience'), cls('SmackJeeves/Magience', 'ComicFury/Magience'),
cls('SmackJeeves/RiversideExtras', 'RiversideExtras'), cls('SmackJeeves/RiversideExtras', 'RiversideExtras'),
cls('SmackJeeves/StarTrip', 'StarTrip'), cls('SmackJeeves/StarTrip', 'StarTrip'),
cls('TalesOfTheQuestor', 'RHJunior/TalesOfTheQuestor'),
cls('TheProbabilityBomb', 'RHJunior/TheProbabilityBomb'),
cls('TracyAndTristan', 'ComicFury/TracyAndTristan'), cls('TracyAndTristan', 'ComicFury/TracyAndTristan'),
cls('UnlikeMinerva', 'NamirDeiter/UnlikeMinerva'), cls('UnlikeMinerva', 'NamirDeiter/UnlikeMinerva'),
cls('Wulffmorgenthaler', 'WuMo'), cls('Wulffmorgenthaler', 'WuMo'),

View file

@ -17,14 +17,6 @@ class QuantumVibe(_ParserScraper):
prevSearch = '//a[./img[contains(@src, "nav/prevstrip")]]' prevSearch = '//a[./img[contains(@src, "nav/prevstrip")]]'
class QuentynQuinnSpaceRanger(_ParserScraper):
stripUrl = 'http://www.rhjunior.com/%s/'
firstStripUrl = stripUrl % 'quentyn-quinn-space-ranger-0001'
url = stripUrl % 'comics/quentyn-quinn-space-ranger'
imageSearch = '//div[contains(@class, "entry-content")]//img'
prevSearch = ('//a[@rel="prev"]', '//a[@title="Quentyn Quinn, Space Ranger"]')
class QuestionableContent(_ParserScraper): class QuestionableContent(_ParserScraper):
url = 'http://www.questionablecontent.net/' url = 'http://www.questionablecontent.net/'
stripUrl = url + 'view.php?comic=%s' stripUrl = url + 'view.php?comic=%s'

View file

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2019-2020 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
from ..scraper import _ParserScraper
class RHJunior(_ParserScraper):
stripUrl = 'http://www.rhjunior.com/%s/'
imageSearch = '//div[contains(@class, "entry-content")]//img'
multipleImagesPerStrip = True
def __init__(self, name, sub, prev, first, last=None):
super(RHJunior, self).__init__('RHJunior/' + name)
self.prevSearch = ('//a[@rel="prev"]', '//a[@title="' + prev + '"]')
self.url = self.stripUrl % ('comics/' + sub)
self.firstStripUrl = self.stripUrl % (sub + '-' + first)
if last:
self.url = self.stripUrl % (sub + '-' + last)
self.endOfLife = True
@classmethod
def getmodules(cls):
return (
cls('GoblinHollow', 'goblin-hollow', '', '0001', last='7'),
cls('NipAndTuck', 'nip-and-tuck', 'Nip and Tuck', '0000'),
cls('QuentynQuinnSpaceRanger', 'quentyn-quinn-space-ranger', 'Quentyn Quinn, Space Ranger', '0001'),
cls('TalesOfTheQuestor', 'tales-of-the-questor', 'Tales of the Questor', 'cover'),
cls('TheJournalOfEnniasLongscript', 'the-journal-of-ennias-longscript', '', '0001', last='0111'),
cls('TheProbabilityBomb', 'the-probability-bomb', 'the Probability Bomb', 'kickstarter')
)

View file

@ -25,14 +25,6 @@ class TailsAndTactics(_ParserScraper):
prevSearch = '//a[text()=" Back"]' prevSearch = '//a[text()=" Back"]'
class TalesOfTheQuestor(_ParserScraper):
stripUrl = 'http://www.rhjunior.com/%s/'
firstStripUrl = stripUrl % 'tales-of-the-questor-cover'
url = stripUrl % 'comics/tales-of-the-questor'
imageSearch = '//div[contains(@class, "entry-content")]//img'
prevSearch = ('//a[@rel="prev"]', '//a[@title="Tales of the Questor"]')
class Tamberlane(_ParserScraper): class Tamberlane(_ParserScraper):
baseUrl = 'https://www.tamberlanecomic.com/' baseUrl = 'https://www.tamberlanecomic.com/'
url = baseUrl + 'latest/' url = baseUrl + 'latest/'
@ -163,15 +155,6 @@ class TheOrderOfTheStick(_BasicScraper):
return page_url.rsplit('/', 1)[-1][:-5] return page_url.rsplit('/', 1)[-1][:-5]
class TheProbabilityBomb(_ParserScraper):
stripUrl = 'http://www.rhjunior.com/%s/'
firstStripUrl = stripUrl % 'the-probability-bomb'
url = stripUrl % 'comics/the-probability-bomb'
imageSearch = '//div[contains(@class, "entry-content")]//img'
prevSearch = ('//a[@rel="prev"]', '//a[contains(@title, "Probability Bomb")]')
multipleImagesPerStrip = True
class TheRockCocks(_BasicScraper): class TheRockCocks(_BasicScraper):
url = 'http://rockcocks.slipshine.net/' url = 'http://rockcocks.slipshine.net/'
rurl = escape(url) rurl = escape(url)