Fix NSFW tagging

This commit is contained in:
Techwolf 2020-04-19 01:50:00 -07:00
parent 7f1ffff3ac
commit d3f2a9e27a
7 changed files with 16 additions and 6 deletions

View file

@ -123,6 +123,7 @@ class BetterDays(_ParserScraper):
firstStripUrl = stripUrl % '2003/04/post-2' firstStripUrl = stripUrl % '2003/04/post-2'
imageSearch = '//img[contains(@src, "/betterdays/comic/")]' imageSearch = '//img[contains(@src, "/betterdays/comic/")]'
prevSearch = '//a[contains(text(), "Previous")]' prevSearch = '//a[contains(text(), "Previous")]'
adult = True
endOfLife = True endOfLife = True
help = 'Index format: yyyy/mm/<your guess>' help = 'Index format: yyyy/mm/<your guess>'

View file

@ -49,7 +49,7 @@ class ComicFury(_ParserScraper):
help = 'Index format: n' help = 'Index format: n'
starter = bounceStarter starter = bounceStarter
def __init__(self, name, sub, lang=None): def __init__(self, name, sub, lang=None, adult=False):
super(ComicFury, self).__init__('ComicFury/' + name) super(ComicFury, self).__init__('ComicFury/' + name)
self.prefix = name self.prefix = name
self.url = 'http://%s.webcomic.ws/comics/' % sub self.url = 'http://%s.webcomic.ws/comics/' % sub
@ -57,6 +57,8 @@ class ComicFury(_ParserScraper):
self.firstStripUrl = self.stripUrl % '1' self.firstStripUrl = self.stripUrl % '1'
if lang: if lang:
self.lang = lang self.lang = lang
if adult:
self.adult = adult
def namer(self, image_url, page_url): def namer(self, image_url, page_url):
parts = page_url.split('/') parts = page_url.split('/')
@ -376,7 +378,7 @@ class ComicFury(_ParserScraper):
cls('Droned', 'droned'), cls('Droned', 'droned'),
cls('DRouggs', 'drouggs'), cls('DRouggs', 'drouggs'),
cls('DrugsAndKisses', 'd-and-k'), cls('DrugsAndKisses', 'd-and-k'),
cls('Druids', 'druids'), cls('Druids', 'druids', adult=True),
cls('DubCity', 'dubcity'), cls('DubCity', 'dubcity'),
cls('DueEast', 'dueeast'), cls('DueEast', 'dueeast'),
cls('DuelingHeroes', 'duelingheroes'), cls('DuelingHeroes', 'duelingheroes'),

View file

@ -95,6 +95,7 @@ class Flipside(_ParserScraper):
firstStripUrl = stripUrl % '1' firstStripUrl = stripUrl % '1'
imageSearch = '//img[contains(@src, "comic/")]' imageSearch = '//img[contains(@src, "comic/")]'
prevSearch = '//a[@rel="prev"]' prevSearch = '//a[@rel="prev"]'
adult = True
help = 'Index format: nnnn' help = 'Index format: nnnn'

View file

@ -133,6 +133,7 @@ class OriginalLife(_ParserScraper):
firstStripUrl = stripUrl % '2009/06/001' firstStripUrl = stripUrl % '2009/06/001'
imageSearch = '//img[contains(@src, "/originallife/comic/")]' imageSearch = '//img[contains(@src, "/originallife/comic/")]'
prevSearch = '//a[contains(text(), "Previous")]' prevSearch = '//a[contains(text(), "Previous")]'
adult = True
help = 'Index format: yyyy/mm/<your guess>' help = 'Index format: yyyy/mm/<your guess>'
@ -149,6 +150,7 @@ class OutOfPlacers(_WordPressScraper):
url = 'http://www.valsalia.com/' url = 'http://www.valsalia.com/'
stripUrl = url + 'comic/%s/' stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % 'prologue/01' firstStripUrl = stripUrl % 'prologue/01'
adult = True
class OverCompensating(_BasicScraper): class OverCompensating(_BasicScraper):

View file

@ -67,6 +67,7 @@ class PeanutBerrySundae(_ParserScraper):
'//img[contains(@src, "page")]') '//img[contains(@src, "page")]')
latestSearch = '//a[contains(@href, "peanut-berry-sundae")]' latestSearch = '//a[contains(@href, "peanut-berry-sundae")]'
starter = indirectStarter starter = indirectStarter
adult = True
def getPrevUrl(self, url, data): def getPrevUrl(self, url, data):
# Replace missing navigation links # Replace missing navigation links

View file

@ -19,19 +19,21 @@ class PetiteSymphony(_WPNavi):
@classmethod @classmethod
def getmodules(cls): def getmodules(cls):
return ( return (
cls("knuckleup"), cls('knuckleup'),
cls("sangria"), cls('sangria'),
) )
class ComicsBreak(_WordPressScraper): class ComicsBreak(_WordPressScraper):
def __init__(self, name, archive=None): def __init__(self, name, archive=None, adult=False):
super(ComicsBreak, self).__init__('ComicsBreak/' + name) super(ComicsBreak, self).__init__('ComicsBreak/' + name)
self.url = 'http://%s.comicsbreak.com/' % name.lower() self.url = 'http://%s.comicsbreak.com/' % name.lower()
if archive: if archive:
self.url = 'https://web.archive.org/web/{}/{}'.format( self.url = 'https://web.archive.org/web/{}/{}'.format(
archive, self.url) archive, self.url)
self.endOfLife = True self.endOfLife = True
if adult:
self.adult = adult
def namer(self, imageUrl, pageUrl): def namer(self, imageUrl, pageUrl):
if self.name == 'ComicsBreak/Djandora': if self.name == 'ComicsBreak/Djandora':
@ -49,5 +51,5 @@ class ComicsBreak(_WordPressScraper):
def getmodules(cls): def getmodules(cls):
return ( return (
cls('Djandora', archive='20170923062433'), cls('Djandora', archive='20170923062433'),
cls("Generation17"), cls('Generation17', adult=True),
) )

View file

@ -138,6 +138,7 @@ class Ryugou(_WPWebcomic):
stripUrl = url + 'comic/%s/' stripUrl = url + 'comic/%s/'
firstStripUrl = 'ryugou-chapter-1-cover' firstStripUrl = 'ryugou-chapter-1-cover'
starter = bounceStarter starter = bounceStarter
adult = True
def namer(self, imageUrl, pageUrl): def namer(self, imageUrl, pageUrl):
title = pageUrl.rstrip('/').rsplit('/', 1)[-1] title = pageUrl.rstrip('/').rsplit('/', 1)[-1]