From 6769e1eb365bddd42d530d3e48b372536a67e65f Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Mon, 13 Oct 2014 22:45:25 +0200 Subject: [PATCH] Add StrongFemaleProtagonist. This uses the _ParserScraper and CSS selectors. --- dosagelib/plugins/s.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py index 82ca43c5d..1ab345d68 100755 --- a/dosagelib/plugins/s.py +++ b/dosagelib/plugins/s.py @@ -4,7 +4,7 @@ from re import compile, escape, IGNORECASE, sub from os.path import splitext -from ..scraper import _BasicScraper +from ..scraper import _BasicScraper, _ParserScraper from ..helpers import indirectStarter, bounceStarter from ..util import tagre, getPageContent @@ -556,6 +556,25 @@ class StrawberryDeathCake(_BasicScraper): help = 'Index format: stripname' +class StrongFemaleProtagonist(_ParserScraper): + url = 'http://strongfemaleprotagonist.com/' + stripUrl = url + '%s/' + css = True + imageSearch = 'article p:first-child img' + prevSearch = 'div.nav-previous > a' + help = 'Index format: issue-?/page-??' + + def shouldSkipUrl(self, url, data): + """Skip hiatus & non-comic pages.""" + return url in ( + self.stripUrl % 'guest-art/tuesday', + self.stripUrl % 'guest-art/friday', + self.stripUrl % 'guest-art/wednesday', + self.stripUrl % 'issue-5/newspaper', + self.stripUrl % 'issue-5/hiatus-1', + self.stripUrl % 'issue-5/hiatus-2', + ) + class SuburbanTribe(_BasicScraper): url = 'http://www.pixelwhip.com/' rurl = escape(url)