70 lines
2.3 KiB
Python
70 lines
2.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
|
# Copyright (C) 2015-2017 Tobias Gruetzmacher
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
from re import compile, escape, IGNORECASE
|
|
|
|
from ..helpers import xpath_class
|
|
from ..scraper import _BasicScraper
|
|
from ..util import tagre
|
|
from .common import _ComicControlScraper, _WordPressScraper
|
|
|
|
|
|
class KevinAndKell(_BasicScraper):
|
|
url = 'http://www.kevinandkell.com/'
|
|
stripUrl = url + '%s/kk%s%s.html'
|
|
firstStripUrl = stripUrl % ('1995', '09', '03')
|
|
imageSearch = compile(r'<img.+?src="(/?(\d+/)?strips/kk\d+.(gif|jpg))"',
|
|
IGNORECASE)
|
|
prevSearch = compile(
|
|
r'<a.+?href="(/?(\.\./)?\d+/kk\d+\.html)"[^>]*><span>Previous Strip',
|
|
IGNORECASE)
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
def getIndexStripUrl(self, index):
|
|
return self.stripUrl % tuple(map(int, index.split('-')))
|
|
|
|
|
|
class KickInTheHead(_WordPressScraper):
|
|
url = 'http://www.kickinthehead.org/'
|
|
firstStripUrl = url + '2003/03/20/ipod-envy/'
|
|
prevSearch = '//a[%s]' % xpath_class('navi-prev')
|
|
|
|
|
|
class KillSixBillionDemons(_WordPressScraper):
|
|
url = 'http://killsixbilliondemons.com/'
|
|
firstStripUrl = url + 'comic/kill-six-billion-demons-chapter-1/'
|
|
prevSearch = '//a[%s]' % xpath_class('navi-prev')
|
|
multipleImagesPerStrip = True
|
|
adult = True
|
|
|
|
|
|
class KiwiBlitz(_ComicControlScraper):
|
|
url = 'http://www.kiwiblitz.com'
|
|
|
|
|
|
class Krakow(_BasicScraper):
|
|
url = 'http://www.krakow.krakowstudios.com/'
|
|
stripUrl = url + 'archive.php?date=%s'
|
|
firstStripUrl = stripUrl % '20081111'
|
|
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 KuroShouri(_BasicScraper):
|
|
url = 'http://kuroshouri.com/'
|
|
rurl = escape(url)
|
|
stripUrl = url + '?webcomic_post=%s'
|
|
imageSearch = compile(
|
|
tagre("img", "src",
|
|
r"(%swp-content/webcomic/kuroshouri/[^'\"]+)" % rurl,
|
|
quote="['\"]"))
|
|
prevSearch = compile(
|
|
tagre("a", "href", r'(%s\?webcomic_post\=[^"]+)' % rurl,
|
|
after="previous"))
|
|
help = 'Index format: chapter-n-page-m'
|