From 19b2b91e9113f4c7447ddfe918deb139ccaa1d0b Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Mon, 15 Jan 2024 21:57:34 -0600 Subject: [PATCH] feat: Added "I Roved Out" --- dosagelib/plugins/i.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dosagelib/plugins/i.py b/dosagelib/plugins/i.py index c11027e20..cb2dd2708 100644 --- a/dosagelib/plugins/i.py +++ b/dosagelib/plugins/i.py @@ -51,6 +51,27 @@ class Inverloch(ParserScraper): endOfLife = True +class IRovedOut(ParserScraper): + url = 'https://www.irovedout.com/' + stripUrl = url + '%s/' + firstStripUrl = stripUrl % 'iro' + imageSearch = '//div[@id="comic"]//img' + prevSearch = '//a[@class="navi comic-nav-previous navi-prev"]' + + def namer(self, imageUrl, pageUrl): + page = self.getPage(pageUrl) + strip = page.xpath('//div[@id="comic-wrap"]/@class')[0].replace('comic-id-', '') + parts = page.xpath('//div[@id="comic"]//img/@src')[0].split('/') + return "{0}-{1}-{2}-{3}".format(parts[5], parts[6], strip.zfill(5), parts[7]) + + def starter(self): + """Return last gallery link.""" + url = 'https://www.irovedout.com/' + data = self.getPage(url) + link = data.xpath('//a[@class="navi navi-last"]/@href').pop(0) + return link + + class IrregularWebcomic(BasicScraper): url = 'http://www.irregularwebcomic.net/' stripUrl = url + '%s.html'