dosage/dosagelib/plugins/j.py

70 lines
2.5 KiB
Python
Raw Normal View History

# -*- 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 19:15:25 +00:00
# Copyright (C) 2015-2017 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
2012-06-20 19:58:13 +00:00
from re import compile, escape
2017-02-12 19:15:25 +00:00
from ..scraper import _BasicScraper, _ParserScraper
2012-11-21 20:57:26 +00:00
from ..util import tagre
2013-07-16 16:01:44 +00:00
from ..helpers import indirectStarter
2016-10-31 05:57:47 +00:00
from .common import _ComicControlScraper, xpath_class
2012-06-20 19:58:13 +00:00
2012-12-08 20:30:51 +00:00
class JackCannon(_BasicScraper):
url = 'http://fancyadventures.com/'
rurl = escape(url)
stripUrl = url + '%s/'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '2008/07/07/2008-07-08'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
2012-12-08 20:30:51 +00:00
help = 'Index format: yyyy/mm/dd/page-nnn'
2017-02-12 19:15:25 +00:00
class JerkCity(_ParserScraper):
url = 'http://www.jerkcity.com/'
2017-02-12 19:15:25 +00:00
stripUrl = url + 'jerkcity%s.html'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '1'
2017-02-12 19:15:25 +00:00
imageSearch = '//div[@id="rapist"]//img'
prevSearch = '//div[@id="rapist"]/a'
2012-11-21 20:57:26 +00:00
help = 'Index format: n'
2012-06-20 19:58:13 +00:00
2013-07-16 16:01:44 +00:00
class JimBenton(_BasicScraper):
url = 'http://www.jimbenton.com/page14/page14.html'
stripUrl = 'http://www.jimbenton.com/page14/files/JimBentonComic-%s.html'
starter = indirectStarter
imageSearch = compile(tagre("img", "src", r'(JimBentonComic-[^"]+)',
before="photo-frame"))
prevSearch = compile(tagre("a", "href", r'(JimBentonComic-[^>]+\.html)',
quote="") + "Next")
latestSearch = compile(tagre("a", "href", r'(files/JimBentonComic-[^>]+\.html)', quote=""))
2013-07-16 16:01:44 +00:00
help = 'Index format: stripname'
2012-06-20 19:58:13 +00:00
class JoeAndMonkey(_BasicScraper):
url = 'http://www.joeandmonkey.com/'
stripUrl = url + '%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'"(/comic/[^"]+)"')
prevSearch = compile(r"<a href='(/\d+)'>Previous")
help = 'Index format: nnn'
2012-12-08 20:30:51 +00:00
2016-05-06 23:50:10 +00:00
class JohnnyWander(_ComicControlScraper):
2016-10-31 05:57:47 +00:00
imageSearch = ('//ul[%s]/li/@data-src' % xpath_class('cc-showbig'),
_ComicControlScraper.imageSearch)
url = 'http://www.johnnywander.com/'
2012-12-09 17:12:21 +00:00
2012-12-08 20:30:51 +00:00
class JustAnotherEscape(_BasicScraper):
url = 'http://www.justanotherescape.com/'
rurl = escape(url)
stripUrl = url + 'index.cgi?date=%s'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href",
r'(%s/index\.cgi\?date=\d+)' % rurl) +
tagre("img", "alt", "Previous Comic"))
2012-12-08 20:30:51 +00:00
help = 'Index format: yyyymmdd'