2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2016-10-28 22:21:41 +00:00
|
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 15:50:57 +00:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2022-06-06 10:08:32 +00:00
|
|
|
# Copyright (C) 2015-2022 Tobias Gruetzmacher
|
2022-06-06 11:07:48 +00:00
|
|
|
import re
|
2016-04-14 21:52:35 +00:00
|
|
|
|
2022-06-06 11:07:48 +00:00
|
|
|
from .common import ComicControlScraper
|
2016-04-14 21:52:35 +00:00
|
|
|
|
|
|
|
|
2022-06-06 11:07:48 +00:00
|
|
|
FILENAMECRAP = re.compile(r'_[0-9a-f]{72}(?=\.)')
|
|
|
|
|
|
|
|
|
|
|
|
class Snafu(ComicControlScraper):
|
2016-06-05 20:11:22 +00:00
|
|
|
def __init__(self, name, path):
|
2022-06-06 10:08:32 +00:00
|
|
|
super().__init__('SnafuComics/' + name)
|
2022-06-06 11:07:48 +00:00
|
|
|
self.url = 'https://snafu-comics.com/' + path
|
2016-04-14 21:52:35 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
2022-06-06 11:07:48 +00:00
|
|
|
return FILENAMECRAP.sub('', image_url.rsplit('/', 1)[-1])
|
2016-04-14 21:52:35 +00:00
|
|
|
|
2016-06-05 20:11:22 +00:00
|
|
|
@classmethod
|
|
|
|
def getmodules(cls):
|
2021-02-01 21:02:54 +00:00
|
|
|
return (
|
2016-06-05 20:11:22 +00:00
|
|
|
cls('Braindead', 'braindead'),
|
|
|
|
cls('Bunnywith', 'bunnywith'),
|
2022-06-06 11:07:48 +00:00
|
|
|
cls('CrawlingCity', 'crawlingcity'),
|
2016-06-05 20:11:22 +00:00
|
|
|
cls('DeliverUsEvil', 'deliverusevil'),
|
|
|
|
cls('EA', 'ea'),
|
|
|
|
cls('FT', 'ft'),
|
2021-02-01 21:02:54 +00:00
|
|
|
cls('GG', 'gg'),
|
2016-06-05 20:11:22 +00:00
|
|
|
cls('GrimTalesFromDownBelow', 'grimtales'),
|
2021-02-01 21:02:54 +00:00
|
|
|
cls('HalfboundBlade', 'hbp'),
|
|
|
|
cls('KayosGaiden', 'titan-kayos'),
|
2016-06-05 20:11:22 +00:00
|
|
|
cls('NarutoHeroesPath', 'naruto'),
|
|
|
|
cls('NewSuperMarioAdventures', 'nsma'),
|
|
|
|
cls('PowerPuffGirls', 'powerpuffgirls'),
|
|
|
|
cls('SatansExcrement', 'satansexcrement'),
|
|
|
|
cls('SkullBoy', 'skullboy'),
|
|
|
|
cls('Soul', 'soul'),
|
|
|
|
cls('Sugar', 'sugarbits'),
|
|
|
|
cls('SureToBeBanD', 'stbb'),
|
|
|
|
cls('TheLeague', 'league'),
|
|
|
|
cls('TrunksAndSoto', 'trunks-and-soto'),
|
|
|
|
cls('TW', 'tw'),
|
|
|
|
cls('Zim', 'zim'),
|
2021-02-01 21:02:54 +00:00
|
|
|
)
|