# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2013 Bastian Kleineidam from re import compile, escape, IGNORECASE from ..scraper import _BasicScraper from ..helpers import indirectStarter from ..util import tagre class TheBrads(_BasicScraper): url = 'http://bradcolbow.com/archive/C4/' stripUrl = url + '%s/' firstStripUrl = stripUrl % 'P125' imageSearch = compile(tagre("img", "src", r'(http://s3\.amazonaws\.com/the_brads/the-?brads[-_][^"]+)')) prevSearch = compile(tagre("a", "href", r'(http://bradcolbow\.com/archive/C4/[^"]+)', before="prev")) multipleImagesPerStrip = True help = 'Index format: a letter and a number' class TheDevilsPanties(_BasicScraper): url = 'http://thedevilspanties.com/' stripUrl = url + 'archives/%s' firstStripUrl = stripUrl % '300' imageSearch = compile(tagre("img", "src", r'(http://cdn\.thedevilspanties\.com/comics/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(/archives/\d+)', after="Previous")) help = 'Index format: number' class TheNoob(_BasicScraper): url = 'http://www.thenoobcomic.com/index.php' stripUrl = url + '?pos=%s' firstStripUrl = stripUrl % '1' imageSearch = compile(tagre("img", "src", r'(/headquarters/comics/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(\?pos=\d+)', before="comic_nav_previous_button")) help = 'Index format: nnnn' class TheOrderOfTheStick(_BasicScraper): baseurl = 'http://www.giantitp.com/' url = baseurl + 'comics/oots0863.html' stripUrl = baseurl + 'comics/oots%s.html' firstStripUrl = stripUrl % '0001' imageSearch = compile(r'') prevSearch = compile(r'') multipleImagesPerStrip = True prevSearch = compile(r'\d{4} -\s+\d{4}') help = 'Index format: nnn' class TheWotch(_BasicScraper): url = 'http://www.thewotch.com/' stripUrl = url + '?date=%s' firstStripUrl = stripUrl % '2002-11-21' imageSearch = compile(r"', IGNORECASE) prevSearch = compile(r' previous', IGNORECASE) help = 'Index format: twb or wb + n wg. twb1000' class HMHigh(_BasicScraper): name = 'TheFallenAngel/HMHigh' baseurl = 'http://www.thefallenagel.co.uk/' url = baseurl + 'hmhigh/' rurl = escape(baseurl) stripUrl = url + '?id=%s' imageSearch = compile(r'Prev' % rurl) help = 'Index format: nnn' class TheOuterQuarter(_BasicScraper): url = 'http://theouterquarter.com/' rurl = escape(url) stripUrl = url + 'comic/%s' firstStripUrl = stripUrl % 'oq-the-first-take/4' imageSearch = compile(r'