Fix SnafuComics

This commit is contained in:
Tobias Gruetzmacher 2022-06-06 13:07:48 +02:00
parent 8e1e398a8d
commit 334640515e
2 changed files with 12 additions and 14 deletions

View file

@ -1563,7 +1563,10 @@ class Removed(Scraper):
cls('SmackJeeves/ZaenWell'),
cls('SmackJeeves/ZeldaTheNewAdventureofLinkIIMajorasMask'),
cls('SnafuComics/KOF'),
cls('SnafuComics/MyPanda'),
cls('SnafuComics/SF'),
cls('SnafuComics/Snafu'),
cls('SnafuComics/Tin'),
cls('SnafuComics/Titan'),
cls('StudioKhimera/Eorah', 'mov'),
cls('StuffNoOneToldMe'),

View file

@ -2,30 +2,28 @@
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2022 Tobias Gruetzmacher
from ..scraper import ParserScraper
from ..helpers import indirectStarter
import re
from .common import ComicControlScraper
class Snafu(ParserScraper):
# Next and Previous are swapped...
prevSearch = '//a[@class="next"]'
imageSearch = '//div[@class="comicpage"]/img'
latestSearch = '//div[@id="feed"]/a'
starter = indirectStarter
FILENAMECRAP = re.compile(r'_[0-9a-f]{72}(?=\.)')
class Snafu(ComicControlScraper):
def __init__(self, name, path):
super().__init__('SnafuComics/' + name)
self.url = 'http://snafu-comics.com/swmseries/' + path
self.url = 'https://snafu-comics.com/' + path
def namer(self, image_url, page_url):
year, month, name = image_url.rsplit('/', 3)[1:]
return "%04s_%02s_%s" % (year, month, name)
return FILENAMECRAP.sub('', image_url.rsplit('/', 1)[-1])
@classmethod
def getmodules(cls):
return (
cls('Braindead', 'braindead'),
cls('Bunnywith', 'bunnywith'),
cls('CrawlingCity', 'crawlingcity'),
cls('DeliverUsEvil', 'deliverusevil'),
cls('EA', 'ea'),
cls('FT', 'ft'),
@ -33,18 +31,15 @@ class Snafu(ParserScraper):
cls('GrimTalesFromDownBelow', 'grimtales'),
cls('HalfboundBlade', 'hbp'),
cls('KayosGaiden', 'titan-kayos'),
cls('MyPanda', 'mypanda'),
cls('NarutoHeroesPath', 'naruto'),
cls('NewSuperMarioAdventures', 'nsma'),
cls('PowerPuffGirls', 'powerpuffgirls'),
cls('SatansExcrement', 'satansexcrement'),
cls('SkullBoy', 'skullboy'),
cls('Snafu', 'snafu'),
cls('Soul', 'soul'),
cls('Sugar', 'sugarbits'),
cls('SureToBeBanD', 'stbb'),
cls('TheLeague', 'league'),
cls('Tin', 'tin'),
cls('TrunksAndSoto', 'trunks-and-soto'),
cls('TW', 'tw'),
cls('Zim', 'zim'),