From 4470e13b1a16410cf5e83c7c3c4eee01874d79b6 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 11 Oct 2012 17:39:38 +0200 Subject: [PATCH] Fix some comics. --- dosagelib/plugins/a.py | 22 +++++++--------------- dosagelib/plugins/num.py | 15 +++------------ 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/dosagelib/plugins/a.py b/dosagelib/plugins/a.py index 7eacc05e0..0075b7526 100644 --- a/dosagelib/plugins/a.py +++ b/dosagelib/plugins/a.py @@ -33,19 +33,11 @@ class AbleAndBaker(_BasicScraper): class AbominableCharlesChristopher(_BasicScraper): latestUrl = 'http://abominable.cc/' imageUrl = 'http://abominable.cc/%s' - imageSearch = compile(r'cc(/comics/.+?)"') - prevSearch = compile(r'cc(/.+?)".+?prev') + imageSearch = compile(tagre("img", "src", r'(http://www\.abominable\.cc/comics/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'([^"]+)')+"[^<]+Previous") help = 'Index format: yyyy/mm/dd/comicname' -class AbstractGender(_BasicScraper): - latestUrl = 'http://www.abstractgender.com/' - imageUrl = 'http://www.abstractgender.com/?comic=%s' - imageSearch = compile(tagre('img', 'src', r'(comics/\d+\.\w+)')) - prevSearch = compile(tagre('a', 'href', r"(\?comic=\d+)")+tagre("img", "id", "comic_menu_prev")) - help = 'Index format: n (unpadded)' - - class AbsurdNotions(_BasicScraper): latestUrl = 'http://www.absurdnotions.org/page129.html' imageUrl = 'http://www.absurdnotions.org/page%s.html' @@ -200,8 +192,8 @@ class AnUnrehearsedRiot(_BasicScraper): class ALLCAPS(_BasicScraper): latestUrl = 'http://www.allcapscomix.com/' imageUrl = 'http://www.allcapscomix.com/%s' - imageSearch = compile(r'(◄ Previous|)') + imageSearch = compile(tagre("img", "src", r'(http://www\.allcapscomix\.com/comics/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'([^"]+)')+r"[^<]+Previous") help = 'Index format: yyyy/mm/strip-name' @@ -209,8 +201,8 @@ class ALLCAPS(_BasicScraper): class ASkeweredParadise(_BasicScraper): latestUrl = 'http://aspcomics.net/' imageUrl = 'http://aspcomics.net/archindex.php?strip_id=%s' - imageSearch = compile(r']+Previous") help = 'Index format: nnn' @@ -219,7 +211,7 @@ class AGirlAndHerFed(_BasicScraper): starter = bounceStarter('http://www.agirlandherfed.com/', compile(r'[^>]+Back')) imageUrl = 'http://www.agirlandherfed.com/img/strip/%s' - imageSearch = compile(r'[^>]+Back') help = 'Index format: nnn' diff --git a/dosagelib/plugins/num.py b/dosagelib/plugins/num.py index 77ef10d8b..91d097f1f 100644 --- a/dosagelib/plugins/num.py +++ b/dosagelib/plugins/num.py @@ -2,6 +2,7 @@ # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs from re import compile +from ..util import tagre from ..scraper import _BasicScraper @@ -9,16 +10,6 @@ class NineteenNinetySeven(_BasicScraper): name = '1997' latestUrl = 'http://www.1977thecomic.com/' imageUrl = 'http://www.1977thecomic.com/%s' - imageSearch = compile(r'') + imageSearch = compile(tagre("img", "src", r'(http://www\.1977thecomic\.com/comics-1977/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'([^"]+)')+"Previous") help = 'Index format: yyyy/mm/dd/strip-name' - - - -class EightHalfByEleven(_BasicScraper): - name = '8HalfByEleven' - latestUrl = 'http://www.lucastds.com/webcomic/' - imageUrl = 'http://www.lucastds.com/webcomic/index.php?strip_id=%s' - imageSearch = compile(r']+?src="themes/tedzsee/images/previous_a.png">') - help = 'Index format: nnn'