From c260640e0aca81ace92d27e8d41a7e30a10d53fd Mon Sep 17 00:00:00 2001 From: Techwolf Date: Sun, 14 Jul 2019 02:14:07 -0700 Subject: [PATCH] Add NonPlayerCharacter --- dosagelib/plugins/n.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dosagelib/plugins/n.py b/dosagelib/plugins/n.py index 22368f228..5a0ffeca4 100644 --- a/dosagelib/plugins/n.py +++ b/dosagelib/plugins/n.py @@ -168,6 +168,19 @@ class NoNeedForBushido(_ParserScraper): help = 'Index format: nnn' +class NonPlayerCharacter(_ParserScraper): + url = 'https://www.lfg.co/' + stripUrl = url + 'npc/tale/%s/' + firstStripUrl = stripUrl % '1-1' + imageSearch = '//div[@id="comic-img"]//img' + prevSearch = '//a[@class="comic-nav-prev"]' + latestSearch = '//div[@id="feature-npc-footer"]/a[contains(@href, "npc/tale/")]' + starter = indirectStarter + + def namer(self, imageUrl, pageUrl): + return pageUrl.rstrip('/').rsplit('/', 1)[-1] + + class NotAVillain(_ParserScraper): url = 'http://navcomic.com/' stripUrl = url + 'not-a-villain/%s/'