Fix SMBC
This commit is contained in:
parent
03f6d2632b
commit
1ebdea7aae
1 changed files with 12 additions and 6 deletions
|
@ -312,15 +312,21 @@ class SluggyFreelance(_ParserScraper):
|
||||||
|
|
||||||
|
|
||||||
class SMBC(_ComicControlScraper):
|
class SMBC(_ComicControlScraper):
|
||||||
url = 'http://www.smbc-comics.com/'
|
url = 'https://www.smbc-comics.com/'
|
||||||
firstStripUrl = url + 'comic/2002-09-05'
|
stripUrl = url + 'comic/%s'
|
||||||
multipleImagesPerStrip = True
|
firstStripUrl = stripUrl % '2002-09-05'
|
||||||
imageSearch = ['//img[@id="cc-comic"]', '//div[@id="aftercomic"]/img']
|
imageSearch = ['//img[@id="cc-comic"]', '//div[@id="aftercomic"]/img']
|
||||||
textSearch = '//img[@id="cc-comic"]/@title'
|
textSearch = '//img[@id="cc-comic"]/@title'
|
||||||
|
multipleImagesPerStrip = True
|
||||||
|
|
||||||
def namer(self, image_url, page_url):
|
def namer(self, imageUrl, pageUrl):
|
||||||
"""Remove random noise from name."""
|
# Remove random noise from filename
|
||||||
return image_url.rsplit('-', 1)[-1]
|
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):
|
class SnowFlame(_WordPressScraper):
|
||||||
|
|
Loading…
Reference in a new issue