# -*- 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 bounceStarter from ..util import tagre class RadioactivePanda(_BasicScraper): latestUrl = 'http://www.radioactivepanda.com/' stripUrl = latestUrl + 'comic/%s' imageSearch = compile(r'[^>].+?navtable_01.gif') help = 'Index format: yyyy-mm-dd' class RedMeat(_BasicScraper): starter = bounceStarter('http://www.redmeat.com/redmeat/current/index.html', compile(r'next')) stripUrl = 'http://www.redmeat.com/redmeat/%s/index.html' imageSearch = compile(r']*>') prevSearch = compile(r'previous') help = 'Index format: yyyy-mm-dd' @classmethod def namer(cls, imageUrl, pageUrl): return imageUrl.split('/')[-2]