', MULTILINE) help = 'Index format: n (unpadded)' class ARedTailsDream(_BasicScraper): description = u"Finnish mythology meets teen boy and his dog" baseUrl = 'http://www.minnasundberg.fi/' stripUrl = baseUrl + 'comic/page%s.php' firstStripUrl = stripUrl % '00' url = baseUrl + 'comic/recent.php' imageSearch = compile(tagre('img', 'src', r'(chapter.+?/eng[^"]*)')) prevSearch = compile(tagre('a', 'href', r'(page\d+\.php)') + tagre("img", "src", r'.*?aprev.*?')) help = 'Index format: nn' class ASofterWorld(_BasicScraper): 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') 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/' url = baseUrl + 'astropix.html' starter = bounceStarter(url, compile(tagre("a", "href", r'(ap\d{6}\.html)') + ">")) stripUrl = baseUrl + 'ap%s.html' firstStripUrl = stripUrl % '061012' imageSearch = compile(tagre("a", "href", r'(image/\d{4}/[^"]+)')) multipleImagesPerStrip = True prevSearch = compile(tagre("a", "href", r'(ap\d{6}\.html)') + "<
") help = 'Index format: yymmdd' def shouldSkipUrl(self, url): """Skip pages without images.""" return url in ( self.stripUrl % '130217', # video self.stripUrl % '130218', # video self.stripUrl % '130226', # video self.stripUrl % '130424', # video ) @classmethod def namer(cls, imageUrl, pageUrl): return '%s-%s' % (pageUrl.split('/')[-1].split('.')[0][2:], imageUrl.split('/')[-1].split('.')[0]) class ASkeweredParadise(_BasicScraper): url = 'http://aspcomics.net/' stripUrl = url + 'comic/%s' firstStripUrl = stripUrl % '001' imageSearch = compile(tagre("img", "src", r'(http://aspcomics\.net/sites/default/files[^"]*/asp\d+\.jpg)[^"]+')) prevSearch = compile(tagre("a", "href", "(/comic/\d+)")+r"[^>]+Previous") help = 'Index format: nnn' class AxeCop(_BasicScraper): description = u'Axe Cop' url = 'http://axecop.com/' rurl = escape(url) starter = bounceStarter(url, ( compile(tagre("a", "href", r'(%scomic/page-\d+-[^"]+/)' % rurl, after="nav-next")), compile(tagre("a", "href", r'(%scomic/[^"]+/)' % rurl, after="nav-next")), ) ) stripUrl = url + 'comic/%s/' firstStripUrl = stripUrl % '0' imageSearch = compile(tagre("img", "src", r'(http://mainsite\.axecop\.wpengine\.com/wp-content/uploads/sites/\d+/\d+/\d+/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(%scomic/[^"]+/)' % rurl, after="nav-prev")) help = 'Index format: usually stripname'