2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
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
|
2020-01-09 16:38:13 +00:00
|
|
|
# Copyright (C) 2015-2020 Tobias Gruetzmacher
|
2020-01-13 06:34:05 +00:00
|
|
|
# Copyright (C) 2019-2020 Daniel Ring
|
2013-04-10 16:19:11 +00:00
|
|
|
from re import compile, escape
|
2016-04-01 22:14:31 +00:00
|
|
|
|
2019-07-03 07:32:45 +00:00
|
|
|
from ..helpers import bounceStarter, indirectStarter
|
2015-04-26 11:32:22 +00:00
|
|
|
from ..scraper import _BasicScraper, _ParserScraper
|
2014-03-26 18:59:42 +00:00
|
|
|
from ..util import tagre
|
2019-07-18 08:30:21 +00:00
|
|
|
from .common import _WordPressScraper, _WPNavi
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2015-05-14 11:06:12 +00:00
|
|
|
class OctopusPie(_ParserScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.octopuspie.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2007-05-14/001-pea-wiggle'
|
2015-05-14 11:06:12 +00:00
|
|
|
imageSearch = '//img[@title]'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd/nnn-strip-name'
|
|
|
|
|
|
|
|
|
2019-07-03 07:32:45 +00:00
|
|
|
class OffWhite(_ParserScraper):
|
|
|
|
stripUrl = 'http://off-white.eu/comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'prologue-page-1-2'
|
|
|
|
url = firstStripUrl
|
|
|
|
imageSearch = '//img[@class="comic-page"]'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
latestSearch = '//a[text()="A"]'
|
|
|
|
starter = indirectStarter
|
|
|
|
endOfLife = True
|
|
|
|
|
|
|
|
def fetchUrls(self, url, data, urlSearch):
|
|
|
|
# Fix missing page
|
|
|
|
if url == self.stripUrl % 'page-37':
|
|
|
|
return ['http://off-white.eu/ow_v2/wp-content/uploads/2011/01/new-037.jpg']
|
|
|
|
return super(OffWhite, self).fetchUrls(url, data, urlSearch)
|
|
|
|
|
|
|
|
def getPrevUrl(self, url, data):
|
|
|
|
# Fix missing page
|
|
|
|
if url == self.stripUrl % 'page-37':
|
|
|
|
return self.stripUrl % 'page-36'
|
|
|
|
return super(OffWhite, self).getPrevUrl(url, data)
|
|
|
|
|
|
|
|
|
2016-05-21 00:38:07 +00:00
|
|
|
class Oglaf(_ParserScraper):
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://oglaf.com/'
|
|
|
|
stripUrl = url + '%s/'
|
2020-04-06 11:23:23 +00:00
|
|
|
firstStripUrl = stripUrl % 'cumsprite'
|
2016-05-21 00:38:07 +00:00
|
|
|
imageSearch = '//img[@id="strip"]'
|
2020-04-06 11:23:23 +00:00
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
nextSearch = '//a[@rel="next"]'
|
2016-05-21 00:38:07 +00:00
|
|
|
multipleImagesPerStrip = True
|
2013-04-04 16:30:02 +00:00
|
|
|
adult = True
|
|
|
|
|
2016-05-21 00:38:07 +00:00
|
|
|
def fetchUrls(self, url, data, search):
|
|
|
|
urls = []
|
|
|
|
urls.extend(super(Oglaf, self).fetchUrls(url, data, search))
|
|
|
|
if search == self.imageSearch:
|
|
|
|
try:
|
|
|
|
nexturls = self.fetchUrls(url, data, self.nextSearch)
|
|
|
|
except ValueError:
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
while nexturls and nexturls[0].startswith(url):
|
|
|
|
data = self.getPage(nexturls[0])
|
|
|
|
urls.extend(super(Oglaf, self).fetchUrls(nexturls, data, search))
|
|
|
|
nexturls = self.fetchUrls(url, data, self.nextSearch)
|
|
|
|
return urls
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
|
2017-05-21 23:17:05 +00:00
|
|
|
class OhJoySexToy(_WPNavi):
|
2014-01-31 03:45:50 +00:00
|
|
|
url = 'http://www.ohjoysextoy.com/'
|
2016-04-10 21:04:34 +00:00
|
|
|
firstStripUrl = url + 'introduction/'
|
|
|
|
textSearch = '//div[@id="comic"]//img/@alt'
|
2014-01-31 03:45:50 +00:00
|
|
|
adult = True
|
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class OkCancel(_BasicScraper):
|
|
|
|
url = 'http://okcancel.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + 'comic/%s.html'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2013-04-10 16:19:11 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%sstrips/okcancel\d{8}\.gif)' % rurl))
|
2016-04-01 22:14:31 +00:00
|
|
|
prevSearch = compile(tagre("div", "class", "previous") +
|
|
|
|
tagre("a", "href", r'(%scomic/\d{1,4}\.html)' % rurl))
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2015-04-26 11:32:22 +00:00
|
|
|
class OmakeTheater(_ParserScraper):
|
2016-05-05 18:55:14 +00:00
|
|
|
url = 'http://omaketheater.com/comic/'
|
|
|
|
stripUrl = url + '%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2015-04-26 11:32:22 +00:00
|
|
|
css = True
|
|
|
|
imageSearch = ".comicImage img"
|
|
|
|
prevSearch = ".previous a"
|
2013-02-06 21:27:40 +00:00
|
|
|
help = 'Index format: number (unpadded)'
|
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class OnTheEdge(_WordPressScraper):
|
|
|
|
url = 'http://ontheedgecomics.com/'
|
|
|
|
firstStripUrl = 'http://ontheedgecomics.com/comic/ote0001/'
|
|
|
|
|
|
|
|
|
2016-10-30 09:57:50 +00:00
|
|
|
class OopsComicAdventure(_WordPressScraper):
|
2020-01-09 16:38:13 +00:00
|
|
|
url = ('https://web.archive.org/web/20190102215141/'
|
|
|
|
'http://oopscomicadventure.com/')
|
|
|
|
endOfLife = True
|
2016-10-30 09:57:50 +00:00
|
|
|
|
|
|
|
|
2017-05-21 23:17:05 +00:00
|
|
|
class Optipess(_WPNavi):
|
2014-09-29 02:41:29 +00:00
|
|
|
url = 'http://www.optipess.com/'
|
2016-03-31 21:13:54 +00:00
|
|
|
firstStripUrl = url + '2008/12/01/jason-friend-of-the-butterflies/'
|
2016-04-10 21:04:34 +00:00
|
|
|
textSearch = '//div[@id="comic"]//img/@alt'
|
2016-05-16 21:16:29 +00:00
|
|
|
textOptional = True
|
2014-09-29 02:41:29 +00:00
|
|
|
|
|
|
|
|
2019-06-20 05:01:12 +00:00
|
|
|
class OrderOfTheBlackDog(_WordPressScraper):
|
|
|
|
url = 'http://orderoftheblackdog.com/'
|
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'issue-1-cover'
|
|
|
|
starter = bounceStarter
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
# Fix inconsistent filenames
|
|
|
|
return '%s.%s' % (pageUrl.rsplit('/', 2)[-2], imageUrl.rsplit('.', 1)[-1])
|
|
|
|
|
|
|
|
|
2019-06-13 02:22:28 +00:00
|
|
|
class OriginalLife(_ParserScraper):
|
|
|
|
url = 'http://jaynaylor.com/originallife/'
|
|
|
|
stripUrl = url + 'archives/%s.html'
|
|
|
|
firstStripUrl = stripUrl % '2009/06/001'
|
|
|
|
imageSearch = '//img[contains(@src, "/originallife/comic/")]'
|
|
|
|
prevSearch = '//a[contains(text(), "Previous")]'
|
2020-04-19 08:50:00 +00:00
|
|
|
adult = True
|
2019-06-13 02:22:28 +00:00
|
|
|
help = 'Index format: yyyy/mm/<your guess>'
|
|
|
|
|
|
|
|
|
2017-02-12 01:16:38 +00:00
|
|
|
class OurHomePlanet(_ParserScraper):
|
|
|
|
url = 'http://www.ourhomeplanet.net/'
|
|
|
|
stripUrl = url + 'comic/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '01'
|
2017-02-12 01:16:38 +00:00
|
|
|
imageSearch = '//a[@rel="next"]/img'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
2019-06-21 08:10:11 +00:00
|
|
|
class OutOfPlacers(_WordPressScraper):
|
|
|
|
url = 'http://www.valsalia.com/'
|
2019-12-31 00:44:19 +00:00
|
|
|
stripUrl = url + 'comic/%s/'
|
2019-06-21 08:10:11 +00:00
|
|
|
firstStripUrl = stripUrl % 'prologue/01'
|
2020-04-19 08:50:00 +00:00
|
|
|
adult = True
|
2019-06-21 08:10:11 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class OverCompensating(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.overcompensating.com/'
|
2013-11-12 17:33:14 +00:00
|
|
|
stripUrl = url + 'oc/index.php?comic=%s'
|
2013-07-18 18:39:53 +00:00
|
|
|
firstStripUrl = stripUrl % '0'
|
2013-11-12 17:33:14 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/oc/comics/[^"]+)'))
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(/oc/index\.php\?comic=\d+)',
|
|
|
|
after="go back"))
|
2013-07-18 18:39:53 +00:00
|
|
|
help = 'Index format: number'
|
2019-07-12 05:37:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
class OzyAndMillie(_WordPressScraper):
|
|
|
|
stripUrl = 'https://ozyandmillie.org/comic/%s/'
|
|
|
|
url = stripUrl % 'ozy-and-millie-2131'
|
|
|
|
firstStripUrl = stripUrl % 'ozy-and-millie-2'
|
|
|
|
endOfLife = True
|