dosage/dosagelib/plugins/k.py

64 lines
2.3 KiB
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2012-06-20 19:58:13 +00:00
from re import compile, IGNORECASE
2012-10-11 10:03:12 +00:00
from ..scraper import _BasicScraper
2012-06-20 19:58:13 +00:00
class KernelPanic(_BasicScraper):
latestUrl = 'http://www.ubersoft.net/kpanic/'
2012-11-13 18:10:19 +00:00
stripUrl = 'http://www.ubersoft.net/kpanic/d/%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'src="(.+?/kp/kp.+?)" ')
prevSearch = compile(r'<li class="previous"><a href="(.+?)">')
help = 'Index format: yyyymmdd.html'
@classmethod
def namer(cls, imageUrl, pageUrl):
return imageUrl.split('/')[-1].split('.')[0]
class Key(_BasicScraper):
latestUrl = 'http://key.shadilyn.com/latestpage.html'
2012-11-13 18:10:19 +00:00
stripUrl = 'http://key.shadilyn.com/pages/%s.html'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'"((?:images/.+?)|(?:pages/images/.+?))"')
prevSearch = compile(r'</a><a href="(.+?html)".+?prev')
help = 'Index format: nnn'
class Krakow(_BasicScraper):
latestUrl = 'http://www.krakowstudios.com/'
2012-11-13 18:10:19 +00:00
stripUrl = 'http://www.krakowstudios.com/archive.php?date=%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(comics/.+?)"')
prevSearch = compile(r'<a href="(archive\.php\?date=.+?)"><img border=0 name=previous_day')
help = 'Index format: yyyymmdd'
class Kukuburi(_BasicScraper):
latestUrl = 'http://www.kukuburi.com/current/'
2012-11-13 18:10:19 +00:00
stripUrl = 'http://thaumic.net/%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'img src="(http://www.kukuburi.com/../comics/.+?)"')
prevSearch = compile(r'nav-previous.+?"(http.+?)"')
help = 'Index format: non'
class KevinAndKell(_BasicScraper):
latestUrl = 'http://www.kevinandkell.com/'
2012-11-13 18:10:19 +00:00
stripUrl = 'http://www.kevinandkell.com/%s/kk%s%s.html'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img.+?src="(/?(\d+/)?strips/kk\d+.gif)"', IGNORECASE)
prevSearch = compile(r'<a.+?href="(/?(\.\./)?\d+/kk\d+\.html)"[^>]*><span>Previous Strip', IGNORECASE)
help = 'Index format: yyyy-mm-dd'
def setStrip(self, index):
2012-11-13 18:10:19 +00:00
self.currentUrl = self.stripUrl % tuple(map(int, index.split('-')))
2012-06-20 19:58:13 +00:00
class KillerKomics(_BasicScraper):
latestUrl = 'http://www.killerkomics.com/web-comics/index_ang.cfm'
2012-11-13 18:10:19 +00:00
stripUrl = 'http://www.killerkomics.com/web-comics/%s.cfm'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(http://www.killerkomics.com/FichiersUpload/Comics/.+?)"')
prevSearch = compile(r'<div id="precedent"><a href="(.+?)"')
help = 'Index format: strip-name'