This commit is contained in:
Techwolf 2021-03-12 22:11:03 -08:00 committed by Tobias Gruetzmacher
parent 03f6d2632b
commit 1ebdea7aae

View file

@ -312,15 +312,21 @@ class SluggyFreelance(_ParserScraper):
class SMBC(_ComicControlScraper):
url = 'http://www.smbc-comics.com/'
firstStripUrl = url + 'comic/2002-09-05'
multipleImagesPerStrip = True
url = 'https://www.smbc-comics.com/'
stripUrl = url + 'comic/%s'
firstStripUrl = stripUrl % '2002-09-05'
imageSearch = ['//img[@id="cc-comic"]', '//div[@id="aftercomic"]/img']
textSearch = '//img[@id="cc-comic"]/@title'
multipleImagesPerStrip = True
def namer(self, image_url, page_url):
"""Remove random noise from name."""
return image_url.rsplit('-', 1)[-1]
def namer(self, imageUrl, pageUrl):
# Remove random noise from filename
filename = imageUrl.rsplit('/', 1)[-1]
if '-' in filename and len(filename.rsplit('-', 1)[-1]) > 12:
filename = filename.rsplit('-', 1)[-1]
elif len(filename) > 22 and filename[0] == '1':
filename = filename[10:]
return filename
class SnowFlame(_WordPressScraper):