dosage/dosagelib/plugins/k.py

71 lines
2.3 KiB
Python
Raw Normal View History

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