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
|
2021-01-31 23:29:36 +00:00
|
|
|
# Copyright (C) 2015-2021 Tobias Gruetzmacher
|
2020-01-13 06:34:05 +00:00
|
|
|
# Copyright (C) 2019-2020 Daniel Ring
|
2019-08-03 07:52:24 +00:00
|
|
|
import json
|
2013-04-10 16:19:11 +00:00
|
|
|
from re import compile, escape, IGNORECASE
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2020-07-31 20:56:30 +00:00
|
|
|
from ..helpers import indirectStarter
|
2015-04-23 07:12:24 +00:00
|
|
|
from ..scraper import _BasicScraper, _ParserScraper
|
2012-11-20 17:53:53 +00:00
|
|
|
from ..util import tagre
|
2021-01-31 23:29:36 +00:00
|
|
|
from ..xml import NS
|
2019-10-18 07:49:55 +00:00
|
|
|
from .common import _ComicControlScraper, _WordPressScraper, _WPWebcomic
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2013-04-10 21:57:09 +00:00
|
|
|
class MacHall(_BasicScraper):
|
|
|
|
url = 'http://www.machall.com/'
|
|
|
|
stripUrl = url + 'view.php?date=%s'
|
|
|
|
firstStripUrl = stripUrl % '2000-11-07'
|
|
|
|
imageSearch = compile(r'<img src="(comics/.+?)"')
|
|
|
|
prevSearch = compile(r'<a href="(.+?)"><img[^>]+?src=\'drop_shadow/previous.gif\'>')
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
2013-04-25 19:09:42 +00:00
|
|
|
class MadamAndEve(_BasicScraper):
|
2014-10-24 21:42:32 +00:00
|
|
|
url = 'http://www.madamandeve.co.za/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = None
|
2014-10-24 21:42:32 +00:00
|
|
|
imageSearch = compile(tagre('img', 'src', r'(/cartoons/me\d{6}\.(gif|jpg))'))
|
2013-04-25 19:09:42 +00:00
|
|
|
multipleImagesPerStrip = True
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2015-04-29 15:36:12 +00:00
|
|
|
|
2015-04-23 07:12:24 +00:00
|
|
|
class Magellan(_ParserScraper):
|
|
|
|
url = 'http://magellanverse.com/'
|
|
|
|
css = True
|
|
|
|
imageSearch = '#comic-1 > a:first-child img'
|
|
|
|
prevSearch = '.nav-previous > a'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2016-03-31 21:13:54 +00:00
|
|
|
|
2013-03-03 19:50:21 +00:00
|
|
|
class MagickChicks(_BasicScraper):
|
|
|
|
url = 'http://www.magickchicks.com/'
|
|
|
|
stripUrl = url + 'strips-mc/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % 'tis_but_a_trifle'
|
2013-03-03 19:50:21 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'([^"]*/comics/[^"]+)'))
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]*/strips-mc/[^"]+)',
|
|
|
|
before="cn[id]prevt"))
|
2013-03-03 19:50:21 +00:00
|
|
|
help = 'Index format: name'
|
|
|
|
|
|
|
|
|
2015-04-26 11:47:38 +00:00
|
|
|
class ManlyGuysDoingManlyThings(_ParserScraper):
|
2013-02-13 16:52:49 +00:00
|
|
|
url = 'http://thepunchlineismachismo.com/'
|
|
|
|
stripUrl = url + 'archives/comic/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '02222010'
|
2015-04-26 11:47:38 +00:00
|
|
|
css = True
|
|
|
|
imageSearch = "#comic img"
|
|
|
|
prevSearch = ".comic-nav-previous"
|
2013-02-13 16:52:49 +00:00
|
|
|
help = 'Index format: ddmmyyyy'
|
|
|
|
|
|
|
|
|
2016-04-29 23:59:28 +00:00
|
|
|
class MareInternum(_WordPressScraper):
|
2019-07-13 06:37:43 +00:00
|
|
|
url = 'https://www.marecomic.com/'
|
2016-04-29 23:59:28 +00:00
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'intro-page-1'
|
2015-04-29 15:36:12 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class Marilith(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.marilith.com/'
|
|
|
|
stripUrl = url + 'archive.php?date=%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '20041215'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src="(comics/.+?)" border')
|
|
|
|
prevSearch = compile(r'<a href="(archive\.php\?date=.+?)"><img border=0 name=previous_day')
|
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2017-02-12 01:16:38 +00:00
|
|
|
class MarriedToTheSea(_ParserScraper):
|
2017-02-12 19:15:25 +00:00
|
|
|
url = 'http://marriedtothesea.com/'
|
2013-07-18 18:39:53 +00:00
|
|
|
stripUrl = url + '%s'
|
2013-07-10 16:43:53 +00:00
|
|
|
firstStripUrl = stripUrl % '022806'
|
2020-07-31 20:56:30 +00:00
|
|
|
imageSearch = '//div[d:class("jumbotron")]//p/img'
|
2017-02-12 01:16:38 +00:00
|
|
|
prevSearch = '//a[contains(text(), "Yesterday")]'
|
2013-07-10 16:43:53 +00:00
|
|
|
help = 'Index format: mmddyy'
|
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
|
|
|
unused, date, filename = image_url.rsplit('/', 2)
|
2013-07-10 16:43:53 +00:00
|
|
|
return '%s-%s' % (date, filename)
|
|
|
|
|
2016-03-31 21:13:54 +00:00
|
|
|
|
2015-05-04 12:06:01 +00:00
|
|
|
class MaxOveracts(_ParserScraper):
|
|
|
|
url = 'http://occasionalcomics.com/'
|
|
|
|
stripUrl = url + '%s/'
|
|
|
|
css = True
|
|
|
|
imageSearch = '#comic img'
|
|
|
|
prevSearch = '.nav-previous > a'
|
|
|
|
help = 'Index format: nnn'
|
2013-07-10 16:43:53 +00:00
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class Meek(_WordPressScraper):
|
2019-12-30 10:12:53 +00:00
|
|
|
url = 'https://www.meekcomic.com/'
|
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'chapter-1-cover'
|
2016-04-01 22:14:31 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class MegaTokyo(_BasicScraper):
|
2019-12-31 00:44:19 +00:00
|
|
|
url = 'https://megatokyo.com/'
|
2013-02-04 20:00:26 +00:00
|
|
|
stripUrl = url + 'strip/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'"(strips/.+?)"', IGNORECASE)
|
|
|
|
prevSearch = compile(r'"(./strip/\d+?)">Prev')
|
|
|
|
help = 'Index format: nnnn'
|
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class Meiosis(_WordPressScraper):
|
|
|
|
url = 'http://meiosiswebcomic.com/'
|
|
|
|
|
|
|
|
|
|
|
|
class Melonpool(_WordPressScraper):
|
|
|
|
url = 'http://www.melonpool.com/'
|
2017-04-15 23:06:41 +00:00
|
|
|
allow_errors = (500,)
|
2016-04-01 22:14:31 +00:00
|
|
|
|
|
|
|
|
2017-10-03 08:47:32 +00:00
|
|
|
class MenageA3(_ComicControlScraper):
|
2013-03-03 20:52:08 +00:00
|
|
|
adult = True
|
|
|
|
url = 'http://www.ma3comic.com/'
|
|
|
|
|
2018-04-21 00:25:55 +00:00
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
"""Remove random junk from image names."""
|
|
|
|
imgname = imageUrl.split('/')[-1]
|
|
|
|
imgbase = imgname.rsplit('-', 1)[1]
|
|
|
|
return '%s' % (imgbase)
|
|
|
|
|
|
|
|
help = 'Index format: name'
|
|
|
|
|
2013-03-03 20:52:08 +00:00
|
|
|
|
2016-04-03 22:12:53 +00:00
|
|
|
class Metacarpolis(_ComicControlScraper):
|
|
|
|
url = 'http://www.metacarpolis.com'
|
|
|
|
|
|
|
|
|
2019-07-03 04:43:45 +00:00
|
|
|
class Misfile(_ComicControlScraper):
|
|
|
|
url = 'http://www.misfile.com/misfile/'
|
|
|
|
stripUrl = url + '%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '2004-02-22'
|
2019-07-03 04:43:45 +00:00
|
|
|
endOfLife = True
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
|
|
|
class MisfileHellHigh(Misfile):
|
|
|
|
name = 'Misfile/HellHigh'
|
|
|
|
url = 'http://www.misfile.com/hell-high/'
|
|
|
|
stripUrl = url + '%s'
|
|
|
|
firstStripUrl = stripUrl % '2019-08-29'
|
2012-11-21 20:57:26 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class MistyTheMouse(_WordPressScraper):
|
|
|
|
url = 'http://www.mistythemouse.com/'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
firstStripUrl = 'http://www.mistythemouse.com/?p=12'
|
|
|
|
|
|
|
|
|
2018-08-28 10:13:48 +00:00
|
|
|
class MonkeyUser(_ParserScraper):
|
|
|
|
url = 'https://www.monkeyuser.com/'
|
|
|
|
prevSearch = '//div[@title="previous"]/a'
|
2021-01-31 23:29:36 +00:00
|
|
|
imageSearch = '//div[d:class("content")]/p/img'
|
|
|
|
|
|
|
|
def shouldSkipUrl(self, url, data):
|
|
|
|
# videos
|
|
|
|
return data.xpath('//div[d:class("video-container")]', namespaces=NS)
|
2018-08-28 10:13:48 +00:00
|
|
|
|
|
|
|
|
2014-02-27 16:45:29 +00:00
|
|
|
class MonsieurLeChien(_BasicScraper):
|
|
|
|
url = 'http://www.monsieur-le-chien.fr/'
|
|
|
|
stripUrl = url + 'index.php?planche=%s'
|
|
|
|
firstStripUrl = stripUrl % '2'
|
2014-02-27 21:30:02 +00:00
|
|
|
lang = 'fr'
|
2014-02-27 16:45:29 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(i/planches/[^"]+)'))
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') +
|
|
|
|
tagre("img", "src", "i/precedent.gif"))
|
2014-02-27 16:45:29 +00:00
|
|
|
help = 'Index format: n'
|
|
|
|
|
|
|
|
|
2019-10-18 07:49:55 +00:00
|
|
|
class Moonlace(_WPWebcomic):
|
2021-01-21 04:19:59 +00:00
|
|
|
url = 'https://moonlace.darkbluecomics.com/'
|
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'page-0-1'
|
2019-06-29 21:39:13 +00:00
|
|
|
adult = True
|
|
|
|
|
|
|
|
def starter(self):
|
|
|
|
# Set age-gate cookie
|
2021-01-21 04:19:59 +00:00
|
|
|
self.session.cookies.set('age_gate', '1', domain='moonlace.darkblueworkshop.com')
|
2019-06-29 21:39:13 +00:00
|
|
|
return indirectStarter(self)
|
|
|
|
|
|
|
|
|
2016-03-31 21:13:54 +00:00
|
|
|
class Moonsticks(_ParserScraper):
|
|
|
|
url = "http://moonsticks.org/"
|
|
|
|
imageSearch = "//div[@class='entry']//img"
|
2016-04-29 23:59:28 +00:00
|
|
|
prevSearch = u"//a[text()='\u00AB Prev']"
|
2016-03-31 21:13:54 +00:00
|
|
|
|
|
|
|
|
2014-01-24 01:23:24 +00:00
|
|
|
class MrLovenstein(_BasicScraper):
|
|
|
|
url = 'http://www.mrlovenstein.com/'
|
2016-04-29 23:59:28 +00:00
|
|
|
stripUrl = url + 'comic/%s'
|
2014-01-24 01:23:24 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2016-03-31 21:13:54 +00:00
|
|
|
imageSearch = (
|
|
|
|
# captures rollover comic
|
2019-11-03 23:16:25 +00:00
|
|
|
compile(tagre("div", "class", r'comic_image') + r'\s*.*\s*' +
|
|
|
|
tagre("div", "style", r'display: none;') + r'\s*.*\s' +
|
2016-03-31 21:13:54 +00:00
|
|
|
tagre("img", "src", r'(/images/comics/[^"]+)')),
|
|
|
|
# captures standard comic
|
|
|
|
compile(tagre("img", "src", r'(/images/comics/[^"]+)',
|
|
|
|
before="comic_main_image")),
|
2014-01-24 01:23:24 +00:00
|
|
|
)
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') +
|
|
|
|
tagre("img", "src", "/images/nav_left.png"))
|
2014-01-24 01:23:24 +00:00
|
|
|
textSearch = compile(r'<meta name="description" content="(.+?)" />')
|
|
|
|
help = 'Index Format: n'
|
|
|
|
|
|
|
|
|
2013-03-20 20:42:04 +00:00
|
|
|
class MyCartoons(_BasicScraper):
|
2013-04-10 16:19:11 +00:00
|
|
|
url = 'http://mycartoons.de/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + 'page/%s'
|
|
|
|
imageSearch = (
|
|
|
|
compile(tagre("img", "src", r'(%swp-content/cartoons/(?:[^"]+/)?\d+-\d+-\d+[^"]+)' % rurl)),
|
|
|
|
compile(tagre("img", "src", r'(%scartoons/[^"]+/\d+-\d+-\d+[^"]+)' % rurl)),
|
|
|
|
)
|
2016-03-31 21:13:54 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%spage/[^"]+)' % rurl) +
|
|
|
|
"«")
|
2013-04-10 16:19:11 +00:00
|
|
|
help = 'Index format: number'
|
|
|
|
lang = 'de'
|
2013-03-20 20:42:04 +00:00
|
|
|
|
|
|
|
|
2019-08-03 07:52:24 +00:00
|
|
|
class MyLifeWithFel(_ParserScraper):
|
|
|
|
baseUrl = 'https://www.mylifewithfel.com/'
|
|
|
|
stripUrl = baseUrl + 'api/posts/%s'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
url = firstStripUrl
|
|
|
|
adult = True
|
|
|
|
|
|
|
|
def starter(self):
|
|
|
|
# Retrieve comic metadata from API
|
|
|
|
data = self.session.get(self.url)
|
|
|
|
data.raise_for_status()
|
|
|
|
return self.stripUrl % data.json()['last']['id']
|
|
|
|
|
|
|
|
def getPrevUrl(self, url, data):
|
|
|
|
return self.stripUrl % json.loads(data.text_content())['previous']['id']
|
|
|
|
|
|
|
|
def fetchUrls(self, url, data, urlSearch):
|
|
|
|
return [self.baseUrl + json.loads(data.text_content())['post']['image']]
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
return pageUrl.rsplit('/', 1)[-1]
|
|
|
|
|
|
|
|
|
2019-07-11 04:56:32 +00:00
|
|
|
class MynarskiForest(_ParserScraper):
|
|
|
|
stripUrl = 'http://mynarskiforest.purrsia.com/xsl%s.htm'
|
|
|
|
url = stripUrl % '09_36'
|
|
|
|
firstStripUrl = stripUrl % '97_01'
|
|
|
|
imageSearch = '//img[not(contains(@src, "arrow"))]'
|
|
|
|
prevSearch = '//a[./img[contains(@src, "arrowbk")]]'
|
|
|
|
multipleImagesPerStrip = True
|
|
|
|
endOfLife = True
|
|
|
|
|
|
|
|
|
2015-05-31 11:39:04 +00:00
|
|
|
class MysteriesOfTheArcana(_ParserScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://mysteriesofthearcana.com/'
|
2015-05-31 11:39:04 +00:00
|
|
|
imageSearch = '//div[@id="comic"]//img'
|
|
|
|
prevSearch = '//a[@class="navprevious"]'
|
2017-01-21 23:11:05 +00:00
|
|
|
|
2017-02-12 01:16:38 +00:00
|
|
|
|
2017-01-21 23:11:05 +00:00
|
|
|
class MonsterUnderTheBed(_WordPressScraper):
|
2017-02-12 01:16:38 +00:00
|
|
|
url = 'http://themonsterunderthebed.net/'
|
2019-12-17 06:38:36 +00:00
|
|
|
stripUrl = url + '?comic=%s'
|
|
|
|
firstStripUrl = stripUrl % 'test-post'
|
|
|
|
adult = True
|