# -*- 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): url = 'http://www.radioactivepanda.com/' stripUrl = url + 'comic/%s' imageSearch = compile(r'[^>].+?navtable_01.gif') help = 'Index format: yyyy-mm-dd' class RedMeat(_BasicScraper): url = 'http://www.redmeat.com/redmeat/current/index.html' starter = bounceStarter(url, 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]