Fix Bethellium and Moonlace

This commit is contained in:
Techwolf 2021-01-20 20:19:59 -08:00 committed by Tobias Gruetzmacher
parent 4ccb66684f
commit 13c612c26e
2 changed files with 7 additions and 30 deletions

View file

@ -99,22 +99,9 @@ class Beetlebum(_BasicScraper):
class Bethellium(_WPWebcomic):
stripUrl = 'http://dbcomics.darkblueworkshop.com/bethellium/%s/'
firstStripUrl = stripUrl % 'chapter-1/cover'
url = firstStripUrl
latestSearch = '//main' + _WPWebcomic.latestSearch
starter = indirectStarter
def getPrevUrl(self, url, data):
prevUrl = super(Bethellium, self).getPrevUrl(url, data)
return prevUrl.replace('%webcomic2_storyline%', 'chapter-2-the-hemlocks-scar')
def namer(self, imageUrl, pageUrl):
# Prepend chapter title to page filenames
chapter = pageUrl.rstrip('/').rsplit('/', 3)[-2]
chapter = chapter.replace('chapter-1', 'chapter-1-the-magic-city')
page = imageUrl.rsplit('/', 1)[-1]
return chapter + '_' + page
url = 'https://bethellium.darkbluecomics.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % 'cover'
class BetterDays(_ParserScraper):

View file

@ -179,26 +179,16 @@ class MonsieurLeChien(_BasicScraper):
class Moonlace(_WPWebcomic):
stripUrl = 'http://dbcomics.darkblueworkshop.com/moonlace/%s/'
firstStripUrl = stripUrl % 'prologue/page-1'
url = firstStripUrl
latestSearch = '//main' + _WPWebcomic.latestSearch
url = 'https://moonlace.darkbluecomics.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % 'page-0-1'
adult = True
def starter(self):
# Set age-gate cookie
self.session.cookies.set('age_gate', '1', domain='darkblueworkshop.com')
self.session.cookies.set('age_gate', '1', domain='moonlace.darkblueworkshop.com')
return indirectStarter(self)
def namer(self, imageUrl, pageUrl):
# Prepend chapter title to page filenames
chapter = pageUrl.rstrip('/').rsplit('/', 3)[-2]
chapter = chapter.replace('prologue', 'chapter-0-prologue')
chapter = chapter.replace('chapter-1', 'chapter-1-heritage')
chapter = chapter.replace('chapter2', 'chapter-2')
page = imageUrl.rsplit('/', 1)[-1]
return chapter + '_' + page
class Moonsticks(_ParserScraper):
url = "http://moonsticks.org/"