From 1a84431456e56610192a9772eb6de98aafe0ac82 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 21 Feb 2013 19:47:21 +0100 Subject: [PATCH] Add Caggage --- doc/changelog.txt | 9 ++++----- dosagelib/plugins/c.py | 12 ++++++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index 98ddb903a..d99a0b46c 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,8 +1,8 @@ Dosage 1.11 (released xx.xx.2013) Features: -- comics: Added comic strips ManlyGuysDoingManlyThings, SandraAndWoo and - SupernormalStep. +- comics: Added comic strips Caggage, ManlyGuysDoingManlyThings, + SandraAndWoo and SupernormalStep. Changes: - comics: Always use connection pooling when downloading pages or files. @@ -10,9 +10,8 @@ Changes: Fixes: - comics: Correct the list of characters not to quote for URL path encoding. This fixes a lot of download errors of DrunkDuck comics. -- comics: Fixed comic strips AbstruseGoose, - ASofterWorld, LasLindas, LookingForGroup and GUComics. -- comics: Removed broken comic strip AbominableCharlesChristopher. +- comics: Fixed a lot of comic strips (see git log for details). + Closes: GH bug #8 Dosage 1.10 (released 10.2.2013) diff --git a/dosagelib/plugins/c.py b/dosagelib/plugins/c.py index 5cb8a1710..39d072a86 100644 --- a/dosagelib/plugins/c.py +++ b/dosagelib/plugins/c.py @@ -9,11 +9,19 @@ from ..helpers import bounceStarter from ..util import tagre +class Caggage(_BasicScraper): + url = 'http://caggagecomic.com/' + stripUrl = url + 'archives/%s' + imageSearch = compile(tagre("img", "src", r'(http://caggagecomic\.com/comics/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(http://caggagecomic\.com/archives/\d+)', after="prev")) + help = 'Index format: number' + + class CaptainSNES(_BasicScraper): url = 'http://www.captainsnes.com/' stripUrl = url + '%s/' - imageSearch = compile(r"') + imageSearch = compile(tagre("img", "src", r"(http://www\.captainsnes\.com/comics/[^']+)", quote="'")) + prevSearch = compile(tagre("a", "href", r'(http://www\.captainsnes\.com/[^"]+)') + tagre("span", "class", "prev")) multipleImagesPerStrip = True help = 'Index format: yyyy/mm/dd/nnn-stripname'