# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012 Bastian Kleineidam from re import compile from ..scraper import _BasicScraper from ..helpers import indirectStarter from ..util import tagre class OctopusPie(_BasicScraper): starter = indirectStarter('http://www.octopuspie.com/', compile(tagre("a", "href", r'(http://www\.octopuspie\.com/[^"]+)') + tagre("img", "src", r'http://www\.octopuspie\.com/junk/latest\.png'))) stripUrl = 'http://www.octopuspie.com/%s' imageSearch = compile(tagre("img", "src", r'(http://www\.octopuspie\.com/strippy/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(http://www\.octopuspie\.com/[^"]+)', after="prev")) help = 'Index format: yyyy-mm-dd/nnn-strip-name' class OddFish(_BasicScraper): latestUrl = 'http://www.odd-fish.net/' stripUrl = latestUrl + '%s/' imageSearch = compile(tagre("img", "src", r'(http://www\.odd-fish\.net/comics/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(http://www\.odd-fish\.net/[^"]+)', after="navi-prev")) help = 'Index format: stripname' class OnTheEdge(_BasicScraper): latestUrl = 'http://ontheedgecomics.com/' stripUrl = 'http://ontheedgecomics.com/comic/%s' imageSearch = compile(r'') help = 'Index format: nnn (unpadded)' class OneQuestion(_BasicScraper): latestUrl = 'http://www.onequestioncomic.com/' stripUrl = latestUrl + 'comic.php?strip_id=%s' imageSearch = compile(tagre("img", "src", r'(istrip_files/strips/\d+\.jpg)')) prevSearch = compile(tagre("a", "href", r'(comic\.php\?strip_id=\d+)') + tagre("img", "src", r'img/arrow_prev\.jpg')) help = 'Index format: n (unpadded)' class OurHomePlanet(_BasicScraper): latestUrl = 'http://gdk.gd-kun.net/' stripUrl = latestUrl + '%s.html' imageSearch = compile(r']+?> \<\-  ') help = 'Index format: yyyymmdd'