From fc3fab850073855782f68ff0849d01bf738ea3f2 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sun, 3 Mar 2013 22:41:11 +0100 Subject: [PATCH] Add Namesake. --- dosagelib/plugins/n.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dosagelib/plugins/n.py b/dosagelib/plugins/n.py index 9f226fcb2..5133f76fd 100644 --- a/dosagelib/plugins/n.py +++ b/dosagelib/plugins/n.py @@ -8,6 +8,19 @@ from ..helpers import indirectStarter, bounceStarter from ..util import tagre +class Namesake(_BasicScraper): + url = 'http://namesakecomic.com/' + stripUrl = url + 'comic/%s' + imageSearch = compile(tagre("img", "src", r'([^"]*/wp-content/uploads/[^"]+)', after='title=')) + prevSearch = compile(tagre("a", "href", r'([^"]*/comic/[^"]+)', after='navi-prev')) + help = 'Index format: name' + + @classmethod + def namer(cls, imageUrl, pageUrl): + imgmatch = compile(r'uploads/(\d+)/(\d+)/(.+)$').search(imageUrl) + return '-'.join(imgmatch.groups()) + + class NamirDeiter(_BasicScraper): url = 'http://www.namirdeiter.com/' stripUrl = url + 'comics/index.php?date=%s'