Merge krisstraub comics into a common module

This commit is contained in:
Tobias Gruetzmacher 2021-08-31 00:38:58 +02:00
parent 05a873a40f
commit adf1531d4f
3 changed files with 23 additions and 16 deletions

View file

@ -282,14 +282,6 @@ class Brink(_WordPressScraper):
endOfLife = True
class BroodHollow(_WordPressScraper):
url = 'https://broodhollow.chainsawsuit.com/'
firstStripUrl = url + 'page/2012/10/06/book-1-curious-little-thing'
def shouldSkipUrl(self, url, data):
return data.xpath('//div[@id="comic"]//iframe')
class Buni(_WordPressScraper):
url = 'http://www.bunicomic.com/'

View file

@ -202,14 +202,6 @@ class Centralia2050(_WordPressScraper):
return page + '.' + ext
class ChainsawSuit(_WordPressScraper):
url = 'http://chainsawsuit.com/comic/'
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2008/03/12/strip-338'
prevSearch = '//img[@alt="previous"]/..'
help = 'Index format: yyyy/mm/dd/stripname'
class ChannelAte(_WPNavi):
url = 'http://www.channelate.com/'

View file

@ -0,0 +1,23 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2021 Tobias Gruetzmacher
from .common import _WordPressScraper
class KrisStraub(_WordPressScraper):
prevSearch = '//a[text()="Previous"]'
endOfLife = True
help = 'Index format: yyyymmdd'
def __init__(self, name, firstDate):
super().__init__(name)
self.url = 'https://{}.krisstraub.com/'.format(name.lower())
self.stripUrl = self.url + '%s.shtml'
self.firstStripUrl = self.stripUrl % firstDate
@classmethod
def getmodules(cls):
return (
cls('BroodHollow', '20121006'),
cls('ChainsawSuit', '20080810'),
cls('Starslip', '20050523'),
)