diff --git a/dosagelib/plugins/a.py b/dosagelib/plugins/a.py index 1c60c8243..824eb086d 100644 --- a/dosagelib/plugins/a.py +++ b/dosagelib/plugins/a.py @@ -1,6 +1,7 @@ # -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs from re import compile, MULTILINE +from ..util import tagre from ..helpers import _BasicScraper, regexNamer, bounceStarter, indirectStarter @@ -8,15 +9,15 @@ from ..helpers import _BasicScraper, regexNamer, bounceStarter, indirectStarter class ALessonIsLearned(_BasicScraper): latestUrl = 'http://www.alessonislearned.com/' imageUrl = 'http://www.alessonislearned.com/lesson%s.html' - imageSearch = compile(r'back') help = 'Index format: n (unpadded)' @@ -24,8 +25,8 @@ class ASofterWorld(_BasicScraper): class AbleAndBaker(_BasicScraper): latestUrl = 'http://www.jimburgessdesign.com/comics/index.php' imageUrl = 'http://www.jimburgessdesign.com/comics/index.php?comic=%s' - imageSearch = compile(r']+src="(comics/\d+\.\w+)"') - prevSearch = compile(r']+id="comic_menu_prev"') + 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' - imageSearch = compile(r'Next »')) + compile(tagre('a', 'href', r'(http://abstrusegoose\.com/\d+)')+"Next »")) imageUrl = 'http://abstrusegoose.com/c%s.html' - imageSearch = compile(r'"]+)"') - prevSearch = compile(r'« Previous') + imageSearch = compile(tagre('img', 'src', r'(http://abstrusegoose\.com/strips/[^<>"]+)')) + prevSearch = compile(tagre('a', 'href', r'(http://abstrusegoose\.com/\d+)') + r'« Previous') help = 'Index format: n (unpadded)' @classmethod @@ -69,16 +69,14 @@ class AbstruseGoose(_BasicScraper): return 'c%03d-%s' % (index, name) - class AcademyVale(_BasicScraper): latestUrl = 'http://imagerie.com/vale/' imageUrl = 'http://imagerie.com/vale/avarch.cgi?%s' - imageSearch = compile(r']+>(
\n|\n|
\n)
 
', MULTILINE) @@ -104,11 +101,10 @@ class AlienLovesPredator(_BasicScraper): return '%s-%s-%s-%s' % (vol, num, ccc, ddd) - class AnarchySD(_BasicScraper): imageUrl = 'http://www.anarchycomic.com/page%s.php' - imageSearch = compile(r'PREVIOUS PAGE') + imageSearch = compile(tagre('img', 'src', r'../(images/page\d+\..+?)')) + prevSearch = compile(tagre('a', 'href', r'(page\d+\.php)')+'PREVIOUS PAGE') help = 'Index format: n (unpadded)' starter = indirectStarter( 'http://www.anarchycomic.com/page1.php',