Fix ComicFury modules

Unfortunatly, many just vanished...
This commit is contained in:
Tobias Gruetzmacher 2022-06-04 11:30:48 +02:00
parent c467de05e3
commit 095bcf4334
2 changed files with 43 additions and 29 deletions

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2021 Tobias Gruetzmacher
# Copyright (C) 2015-2022 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring
import os
@ -13,9 +13,11 @@ XPATH_IMG = '//div[d:class("comicnav")]//a[img[contains(@alt, "%s")]]'
class ComicFury(_ParserScraper):
imageSearch = ('//img[@id="comicimage"]',
imageSearch = (
'//img[@id="comicimage"]',
'//div[@id="comicimagewrap"]//embed',
'//div[@id="comicimagewrap"]//img')
'//div[@id="comicimagewrap"]//img',
)
prevSearch = (
'//link[@rel="prev"]',
# 137 (needs to be before the generic a@rel, because layout is wrong)
@ -53,10 +55,10 @@ class ComicFury(_ParserScraper):
help = 'Index format: n'
starter = bounceStarter
def __init__(self, name, sub, lang=None, adult=False, endOfLife=False):
def __init__(self, name, sub, lang=None, adult=False, endOfLife=False, segmented=False):
super(ComicFury, self).__init__('ComicFury/' + name)
self.prefix = name
self.url = 'http://%s.webcomic.ws/comics/' % sub
self.url = 'https://%s.webcomic.ws/comics/' % sub
self.stripUrl = self.url + '%s'
self.firstStripUrl = self.stripUrl % '1'
if lang:
@ -65,6 +67,11 @@ class ComicFury(_ParserScraper):
self.adult = adult
if endOfLife:
self.endOfLife = endOfLife
if segmented:
self.multipleImagesPerStrip = True
self.imageSearch = self.imageSearch + (
'//img[d:class("comicsegmentimage")]',
)
def namer(self, image_url, page_url):
parts = page_url.split('/')
@ -72,6 +79,12 @@ class ComicFury(_ParserScraper):
num = parts[-1]
return "%s_%s%s" % (self.prefix, num, ext)
def shouldSkipUrl(self, url, data):
"""Skip pages without images."""
# Videos on Underverse
return (data.xpath('//div[@id="comicimagewrap"]//video') and
not data.xpath('//div[@id="comicimagewrap"]//img'))
@classmethod
def getmodules(cls): # noqa: Allowed to be long
return (
@ -113,7 +126,6 @@ class ComicFury(_ParserScraper):
cls('AdventuresInJetpacks', 'adventuresinjetpacks'),
cls('AdventuresInTanoshii', 'adventuresintanoshii'),
cls('AdventuresInTrueLove', 'advtl'),
cls('AdventuresOftheGreatCaptainMaggieandCrew', 'adventuresofmaggie'),
cls('Aerosol', 'aerosol'),
cls('AetherEarthAndSun', 'aether'),
cls('AForeverQuest', 'aforeverquest'),
@ -218,7 +230,6 @@ class ComicFury(_ParserScraper):
cls('BlackTapestries', 'blacktapestries', adult=True),
cls('BlitzPhoenix', 'blinix'),
cls('BlobWorld', 'blobworld'),
cls('BloodLegaciesEternity', 'bloodlegacieseternity'),
cls('BlueBloodHeroes', 'bluebloodheroes'),
cls('BoatcrashChronicles', 'boatcrash'),
cls('BobbyTheFetus', 'bobbythefetus'),
@ -268,7 +279,7 @@ class ComicFury(_ParserScraper):
cls('ChristmasWithMadDog', 'christmas-with-maddog'),
cls('ChronoRedux', 'chronoredux'),
cls('Cinder', 'cinder'),
cls('CircusJaxs', 'circusjaxs'),
cls('CircusJaxs', 'circusjaxs', segmented=True),
cls('CityFolk', 'cityfolkwebcomics'),
cls('CityOfDream', 'cityofdream'),
cls('CKarrus', 'ckarrus'),
@ -340,7 +351,6 @@ class ComicFury(_ParserScraper):
cls('DefineHero', 'definehero'),
cls('DELIA', 'delia'),
cls('DemasPokmonAdventure', 'nuzlocke-dema'),
cls('DemonWings', 'demonwings'),
cls('DesertGrey', 'desertgrey'),
cls('DesertShark', 'desertshark'),
cls('Dictatorship', 'dictatorship'),
@ -348,7 +358,6 @@ class ComicFury(_ParserScraper):
cls('DimensioNoir', 'dimensionoir'),
cls('DivinaFortuna', 'divinafortuna'),
cls('DNA', 'd-n-a'),
cls('DnDDumbAndDumber', 'dnddumbanddumber'),
cls('DoffeEllende', 'doffeellende'),
cls('Dogstar', 'dogstar'),
cls('Domain', 'domain'),
@ -402,7 +411,6 @@ class ComicFury(_ParserScraper):
cls('ExperiMentalTheatre', 'emt'),
cls('FacesOfFire', 'facesofire'),
cls('Fallacy', 'fallacy-harha'),
cls('FandomMisadventures', 'eatabaguette'),
cls('Fannicklas', 'fannicklas'),
cls('FatalExpression', 'fexpression'),
cls('FBHNKAG', 'fbhnk-ag'),
@ -475,7 +483,7 @@ class ComicFury(_ParserScraper):
cls('HazyDaze', 'hazydaze'),
cls('HeadRoom', 'headroom'),
cls('HeadWound', 'headwound'),
cls('HeartOfKeol', 'keol'),
cls('HeartOfKeol', 'keol', segmented=True),
cls('HeavyLittlePeople', 'heavylittlepeople'),
cls('HeavyMetalSailorMoon', 'hmsm'),
cls('Hellbent', 'hellbent'),
@ -485,7 +493,6 @@ class ComicFury(_ParserScraper):
cls('HeraclesKnot', 'heraclesknot'),
cls('HeroesAtWork', 'heroesatwork'),
cls('HeroesOfPower', 'myhorriblesite'),
cls('HINATATheDemonSlayer', 'hinatax'),
cls('HitmanPiranha', 'hitmanpiranha'),
cls('HitmenForDestiny', 'hitmen'),
cls('HobGoblinAdventure', 'hobgoblin'),
@ -512,7 +519,6 @@ class ComicFury(_ParserScraper):
cls('IlusionOfTime', 'illusionoftime'),
cls('Immigrant', 'immigrant'),
cls('ImNotYourFriend', 'imnotyourfriend'),
cls('Imp', 'imp'),
cls('ImperialEntanglements', 'imperialentanglements'),
cls('Imperium', 'imperium'),
cls('IMPERIVM', 'imperivmgalactica'),
@ -634,7 +640,6 @@ class ComicFury(_ParserScraper):
cls('Magience', 'magience'),
cls('MAGISAPARASAYOupdatesMonFri', 'mag-isa'),
cls('MagnaComica', 'magnacomica'),
cls('Maluk', 'maluk'),
cls('ManChildren', 'manchildren'),
cls('MariosCastleTales', 'mariocastletales', 'it'),
cls('MarriedToATransformersFan', 'marriedtoatransformersfan'),
@ -661,7 +666,6 @@ class ComicFury(_ParserScraper):
cls('MiraclesOfNeksenziPoint', 'neksenzi-miracles'),
cls('MirroredConversations', 'mirroredconversations'),
cls('MiscellaneousMadness', 'rangerrandom'),
cls('Mischeif', 'mischeif'),
cls('MissingDream', 'missingdream'),
cls('MissionMars', 'missionmars'),
cls('MithrilRavens', 'mithril-ravens'),
@ -682,7 +686,7 @@ class ComicFury(_ParserScraper):
cls('MousebearComedy', 'mousebearcomedy'),
cls('MrCow', 'mrcow'),
cls('MrPunchAndProfRatbaggyEmeritus', 'punch'),
cls('MuddlemarchMudCompany', 'muddlemarch'),
cls('MudCompany', 'mudcompany'),
cls('Mudskipper', 'mudskipper'),
cls('Muscleheart', 'muscleheart'),
cls('MushroomGo', 'mushroomgo'),
@ -715,7 +719,6 @@ class ComicFury(_ParserScraper):
cls('NoTitleRequired', 'ntr'),
cls('NotSinceYou', 'notsinceyou'),
cls('NyxInTheOverworld', 'nyx'),
cls('OceanLabyrinth', 'oceanlabyrinth'),
cls('Oeight', 'oeight'),
cls('OffCentaured', 'offcentaured'),
cls('OfficeLogic', 'office-logic'),
@ -740,7 +743,7 @@ class ComicFury(_ParserScraper):
cls('ParaFrenic', 'parafrenic'),
cls('ParasiteGalaxy', 'parasitegalaxy'),
cls('Parisel313', 'parisel313'),
cls('PARKER', 'parker'),
cls('PARKER', 'parker', segmented=True),
cls('Parmeshen', 'parmeshen'),
cls('ParoxysmTemporal', 'pt'),
cls('PateEmpire', 'pateempire'),
@ -757,7 +760,6 @@ class ComicFury(_ParserScraper):
cls('Pilgrim', 'pilgrimsprogress'),
cls('PilgrimEnEspanol', 'pilgrimenespanol', 'es'),
cls('PITCHBLACK', 'pitchblack'),
cls('PlanetChaser', 'planetchaser'),
cls('PlasticBulletsMayhemUnloaded', 'plasticbulletsmayhemunloaded'),
cls('Poharex', 'poharex'),
cls('PokemonWarpers', 'pokemonwarpers'),
@ -782,13 +784,11 @@ class ComicFury(_ParserScraper):
cls('PureHavoc', 'pure-havoc'),
cls('Queenie', 'queenie'),
cls('QuestCorporeal', 'questcorporeal'),
cls('RadioMustard', 'radiomustard'),
cls('Rain', 'rain'),
cls('RandomlyAssembled', 'randomlyassembled'),
cls('RandomThoughts', 'randomthoughts'),
cls('RapturousArcane', 'rapturousarcane'),
cls('RawLatex', 'rawlatex'),
cls('RaytoonsKids', 'raytoonskids'),
cls('ReadershipOfOne', 'readershipofone'),
cls('RebelYell', 'rebelyell'),
cls('RebuildOfGenericMangaShippuden', 'rebuildofgenericmanga'),
@ -852,7 +852,6 @@ class ComicFury(_ParserScraper):
cls('Sigh', 'sigh'),
cls('Silver', 'sil-ver'),
cls('SilverNights', 'silvernights'),
cls('SixteenCandlesHuntersAgency', 'sixteencandles'),
cls('Skeeter', 'herecomesskeeter'),
cls('Sketchy', 'sketchy'),
cls('Skylords', 'skylords'),
@ -886,7 +885,7 @@ class ComicFury(_ParserScraper):
cls('StickMisadventures', 'stick-misadventures'),
cls('StinkomanFatChickenQuest', 'stinkoman'),
cls('StonedHeroes', 'stonedheroes'),
cls('StrangeAttractors', 'strangeattractors'),
cls('StrangeAttractors', 'strangeattractors', segmented=True),
cls('Streamo', 'streamo'),
cls('SundaySmash', 'sundaysmash'),
cls('Sunray', 'sunray'),
@ -905,7 +904,7 @@ class ComicFury(_ParserScraper):
cls('TalesOfTheGalli', 'totg-mirror'),
cls('TamTeamAdventures', 'tamteam'),
cls('TangledMessTheGirlyNerdyTerriblyStrangeJournalComi', 'tangledmess'),
cls('TangledRiver', 'tangled-river'),
cls('TangledRiver', 'tangled-river', segmented=True),
cls('TBA', 'tba'),
cls('TBAold', 'tba-old'),
cls('TerwilligersCafe', 'terwilligers'),
@ -926,7 +925,7 @@ class ComicFury(_ParserScraper):
cls('THEBIGSCIFIMISHMASH', 'thebigsci-fimish-mash'),
cls('TheBlackPrincess', 'theblackprincess'),
cls('THEBOOKOFLIES', 'bookofliescomic'),
cls('TheBookOfThree', 'thebookofthree'),
cls('TheBookOfThree', 'thebookofthree', segmented=True),
cls('TheChanterelleAndMayLife', 'chanterelleandmay'),
cls('TheChroniclesOfBuckyONeill', 'buckyoneill'),
cls('TheChroniclesOfDrew', 'thechroniclesofdrew'),
@ -963,7 +962,6 @@ class ComicFury(_ParserScraper):
cls('TheILL', 'theill'),
cls('TheIntrovertManifesto', 'introvert'),
cls('TheJabbercrow', 'jabbercrow'),
cls('TheKAMics', 'thekamics'),
cls('TheKeepOnTheBorderlands', 'thekeepontheborderlands'),
cls('TheLamp', 'thelamp'),
cls('TheLastHope', 'tlhcomic'),

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2021 Tobias Gruetzmacher
# Copyright (C) 2015-2022 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring
from ..scraper import Scraper
@ -609,26 +609,41 @@ class Removed(Scraper):
# Removed in 3.0
cls('ComicFury/AWAKENING'),
cls('ComicFury/AdventuresOftheGreatCaptainMaggieandCrew'),
cls('ComicFury/Beebleville'),
cls('ComicFury/BloodLegaciesEternity'),
cls('ComicFury/CharlesAndViktor'),
cls('ComicFury/DemonWings'),
cls('ComicFury/DnDDumbAndDumber'),
cls('ComicFury/DoodlelandComics'),
cls('ComicFury/Elements'),
cls('ComicFury/FairyDust'),
cls('ComicFury/FandomMisadventures'),
cls('ComicFury/GreenerGrass'),
cls('ComicFury/HINATATheDemonSlayer'),
cls('ComicFury/HelloWanderingStar'),
cls('ComicFury/Hodgemosh'),
cls('ComicFury/Imp'),
cls('ComicFury/Kitsune'),
cls('ComicFury/LaszloAndEdgar'),
cls('ComicFury/Maluk'),
cls('ComicFury/MegamanComic'),
cls('ComicFury/Mischeif'),
cls('ComicFury/OceanLabyrinth'),
cls('ComicFury/PatchworkPeople'),
cls('ComicFury/PlanetChaser'),
cls('ComicFury/PornographyInFiveActs'),
cls('ComicFury/PoussireDeFe'),
cls('ComicFury/RED'),
cls('ComicFury/RadioMustard'),
cls('ComicFury/RaytoonsKids'),
cls('ComicFury/ResNullius'),
cls('ComicFury/ResNulliusCS'),
cls('ComicFury/Seed'),
cls('ComicFury/SixteenCandlesHuntersAgency'),
cls('ComicFury/TheAcryden'),
cls('ComicFury/TheHourlyComic'),
cls('ComicFury/TheKAMics'),
cls('ComicFury/TheUnthinkableHybrid'),
cls('ComicFury/TwentyFourSeven'),
cls('ComicFury/TwentyFourSevenFans'),
@ -1612,6 +1627,7 @@ class Renamed(Scraper):
# Renamed in 3.0
cls('AHClub', 'RickGriffinStudios/AHClub'),
cls('ComicFury/MuddlemarchMudCompany', 'ComicFury/MudCompany'),
cls('CrapIDrewOnMyLunchBreak', 'WebToons/CrapIDrewOnMyLunchBreak'),
cls('GoComics/BloomCounty2017', 'GoComics/BloomCounty2019'),
cls('GoComics/Cathy', 'GoComics/CathyClassics'),