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'
imageSearch = '//img[contains(@src, "/betterdays/comic/")]'
prevSearch = '//a[contains(text(), "Previous")]'
adult = True
endOfLife = True
help = 'Index format: yyyy/mm/<your guess>'

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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