2016-03-20 20:48:42 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-06-20 22:41:04 +02:00
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 16:50:57 +01:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2016-03-20 20:48:42 +01:00
|
|
|
# Copyright (C) 2015-2016 Tobias Gruetzmacher
|
2012-06-20 21:58:13 +02:00
|
|
|
|
2016-04-02 00:14:31 +02:00
|
|
|
from __future__ import absolute_import, division, print_function
|
2016-04-04 00:12:53 +02:00
|
|
|
|
2013-04-10 18:19:11 +02:00
|
|
|
from re import compile, escape, IGNORECASE
|
2016-04-04 00:12:53 +02:00
|
|
|
|
2016-03-20 20:48:42 +01:00
|
|
|
from ..scraper import _BasicScraper
|
2012-12-04 07:02:40 +01:00
|
|
|
from ..util import tagre
|
2016-04-10 23:04:34 +02:00
|
|
|
from .common import _ComicControlScraper, _WordPressScraper, xpath_class
|
2013-04-11 18:27:43 +02:00
|
|
|
|
2012-06-20 21:58:13 +02:00
|
|
|
|
|
|
|
class KevinAndKell(_BasicScraper):
|
2013-02-04 21:00:26 +01:00
|
|
|
url = 'http://www.kevinandkell.com/'
|
|
|
|
stripUrl = url + '%s/kk%s%s.html'
|
2013-03-25 19:48:19 +01:00
|
|
|
firstStripUrl = stripUrl % ('1995', '09', '03')
|
2016-03-20 20:48:42 +01:00
|
|
|
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)
|
2012-06-20 21:58:13 +02:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
2013-03-06 20:00:30 +01:00
|
|
|
def getIndexStripUrl(self, index):
|
|
|
|
return self.stripUrl % tuple(map(int, index.split('-')))
|
2012-06-20 21:58:13 +02:00
|
|
|
|
|
|
|
|
2013-03-06 20:21:10 +01:00
|
|
|
class Key(_BasicScraper):
|
2013-04-13 20:58:00 +02:00
|
|
|
baseUrl = 'http://key.shadilyn.com/'
|
|
|
|
url = baseUrl + 'latestpage.html'
|
|
|
|
stripUrl = baseUrl + 'pages/%s.html'
|
2013-03-06 20:21:10 +01:00
|
|
|
imageSearch = compile(r'"((?:images/.+?)|(?:pages/images/.+?))"')
|
|
|
|
prevSearch = compile(r'</a><a href="(.+?html)".+?prev')
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
2016-04-10 23:04:34 +02:00
|
|
|
class KickInTheHead(_WordPressScraper):
|
2013-03-12 21:16:17 +01:00
|
|
|
url = 'http://www.kickinthehead.org/'
|
2016-04-10 23:04:34 +02:00
|
|
|
firstStripUrl = url + '2003/03/20/ipod-envy/'
|
|
|
|
prevSearch = '//a[%s]' % xpath_class('navi-prev')
|
2013-03-12 21:16:17 +01:00
|
|
|
|
|
|
|
|
2016-04-04 00:12:53 +02:00
|
|
|
class KiwiBlitz(_ComicControlScraper):
|
|
|
|
url = 'http://www.kiwiblitz.com'
|
|
|
|
|
|
|
|
|
2013-03-06 20:21:10 +01:00
|
|
|
class Krakow(_BasicScraper):
|
|
|
|
url = 'http://www.krakow.krakowstudios.com/'
|
|
|
|
stripUrl = url + 'archive.php?date=%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '20081111'
|
2013-03-06 20:21:10 +01:00
|
|
|
imageSearch = compile(r'<img src="(comics/.+?)"')
|
2016-03-20 20:48:42 +01:00
|
|
|
prevSearch = compile(
|
|
|
|
r'<a href="(archive\.php\?date=.+?)"><img border=0 name=previous_day')
|
2013-03-06 20:21:10 +01:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
|
|
|
class Kukuburi(_BasicScraper):
|
2013-04-13 20:58:00 +02:00
|
|
|
baseUrl = 'http://www.kukuburi.com/'
|
|
|
|
url = baseUrl + 'current/'
|
|
|
|
stripUrl = baseUrl + 'v2/%s/'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '2007/08/09/one'
|
2016-03-20 20:48:42 +01:00
|
|
|
imageSearch = compile(
|
|
|
|
tagre("img", "src", r'(http://www\.kukuburi\.com/v2/comics/[^"]+)',
|
|
|
|
after='alt="[^"]'))
|
2013-03-06 20:21:10 +01:00
|
|
|
prevSearch = compile(r'nav-previous.+?"(http.+?)"')
|
|
|
|
help = 'Index format: yyyy/mm/dd/stripname'
|
|
|
|
|
|
|
|
|
2012-12-13 21:05:27 +01:00
|
|
|
class KuroShouri(_BasicScraper):
|
2013-04-10 18:19:11 +02:00
|
|
|
url = 'http://kuroshouri.com/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + '?webcomic_post=%s'
|
2016-03-20 20:48:42 +01:00
|
|
|
imageSearch = compile(
|
|
|
|
tagre("img", "src",
|
|
|
|
r"(%swp-content/webcomic/kuroshouri/[^'\"]+)" % rurl,
|
|
|
|
quote="['\"]"))
|
|
|
|
prevSearch = compile(
|
|
|
|
tagre("a", "href", r'(%s\?webcomic_post\=[^"]+)' % rurl,
|
|
|
|
after="previous"))
|
2013-04-10 18:19:11 +02:00
|
|
|
help = 'Index format: chapter-n-page-m'
|