From 6576dd7ec78c189fd6f3c69b0522766c2698d90b Mon Sep 17 00:00:00 2001 From: Techwolf Date: Thu, 20 Jun 2019 00:08:51 -0700 Subject: [PATCH] Add ShadesOfGray --- dosagelib/plugins/s.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py index 9851ebe8a..d3cf479ce 100644 --- a/dosagelib/plugins/s.py +++ b/dosagelib/plugins/s.py @@ -180,6 +180,20 @@ class SexyLosers(_ParserScraper): namer = joinPathPartsNamer((-2,), (-1,), '-') +class ShadesOfGray(_ParserScraper): + url = 'https://www.theduckwebcomics.com/Shades_of_Gray/' + stripUrl = url + '%s/' + firstStripUrl = stripUrl % '4820502' + imageSearch = '//div[@id="comic"]/img' + prevSearch = '//a[img[@class="arrow_prev"]]' + nextSearch = '//a[img[@class="arrow_next"]]' + starter = bounceStarter + endOfLife = True + + def namer(self, imageUrl, pageUrl): + return pageUrl.rstrip('/').rsplit('/', 1)[-1] + + class Sharksplode(_WordPressScraper): url = 'http://sharksplode.com/' textSearch = '//div[@id="comic"]//img/@alt'