From 8f3a9f660ae419a9ab451af5d6704ea03d368222 Mon Sep 17 00:00:00 2001 From: DirkReiners Date: Thu, 16 Apr 2015 18:35:21 -0500 Subject: [PATCH] Fixed ASofterWorld --- dosagelib/plugins/a.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dosagelib/plugins/a.py b/dosagelib/plugins/a.py index 86941db63..d4b67d9ae 100644 --- a/dosagelib/plugins/a.py +++ b/dosagelib/plugins/a.py @@ -4,7 +4,7 @@ from re import compile, escape, MULTILINE from ..util import tagre -from ..scraper import _BasicScraper +from ..scraper import _BasicScraper, _ParserScraper from ..helpers import regexNamer, bounceStarter, indirectStarter @@ -304,16 +304,16 @@ class ARedTailsDream(_BasicScraper): help = 'Index format: nn' -class ASofterWorld(_BasicScraper): +class ASofterWorld(_ParserScraper): url = 'http://www.asofterworld.com/' stripUrl = url + 'index.php?id=%s' firstStripUrl = stripUrl % '1' - imageSearch = compile(tagre("p", "id", "thecomic") + r'\s*' + - tagre("img", "src", r'(http://www\.asofterworld\.com/clean/[^"]+)')) - prevSearch = compile(tagre("a", "href", "(index\.php\?id=\d+)")+'< back') + imageSearch = '//div[@id="comicimg"]//img' + prevSearch = '//div[@id="previous"]/a' help = 'Index format: n (unpadded)' + class AstronomyPOTD(_BasicScraper): description = u'A different astronomy and space science related image is featured each day, along with a brief explanation.' baseUrl = 'http://antwrp.gsfc.nasa.gov/apod/'