# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012 Bastian Kleineidam from re import compile, IGNORECASE from ..scraper import _BasicScraper from ..util import tagre class Key(_BasicScraper): url = 'http://key.shadilyn.com/latestpage.html' stripUrl = 'http://key.shadilyn.com/pages/%s.html' imageSearch = compile(r'"((?:images/.+?)|(?:pages/images/.+?))"') prevSearch = compile(r']*>Previous Strip', IGNORECASE) help = 'Index format: yyyy-mm-dd' def setStrip(self, index): self.currentUrl = self.stripUrl % tuple(map(int, index.split('-'))) class KhaosKomix(_BasicScraper): adult = True url = 'http://www.khaoskomix.com/' stripUrl = url + 'komix/%s' imageSearch = compile(tagre("img", "src", r'(http://www\.khaoskomix\.com/komiximg/[^"]+)')) prevSearch = compile(tagre("a", "href", r'(http://www\.khaoskomix\.com/komix/[^"]+)', after="Prev")) help = 'Index format: stripname' class KillerKomics(_BasicScraper): url = 'http://www.killerkomics.com/web-comics/index_ang.cfm' stripUrl = 'http://www.killerkomics.com/web-comics/%s.cfm' imageSearch = compile(r'