Fix some more comic modules

This commit is contained in:
Tobias Gruetzmacher 2024-02-15 00:50:33 +01:00
parent aa50afdbf7
commit ea2bad5500
No known key found for this signature in database
3 changed files with 33 additions and 66 deletions

View file

@ -4,7 +4,7 @@
# SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher # SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
# SPDX-FileCopyrightText: © 2019 Daniel Ring # SPDX-FileCopyrightText: © 2019 Daniel Ring
import json import json
from re import compile, escape, IGNORECASE from re import compile, IGNORECASE
from ..helpers import indirectStarter from ..helpers import indirectStarter
from ..scraper import ParserScraper, _BasicScraper, _ParserScraper from ..scraper import ParserScraper, _BasicScraper, _ParserScraper
@ -13,13 +13,10 @@ from ..xml import NS
from .common import ComicControlScraper, WordPressScraper, WordPressWebcomic from .common import ComicControlScraper, WordPressScraper, WordPressWebcomic
class MacHall(_BasicScraper): class MacHall(ComicControlScraper):
url = 'http://www.machall.com/' url = 'https://www.machall.com/'
stripUrl = url + 'view.php?date=%s' stripUrl = url + 'comic/%s'
firstStripUrl = stripUrl % '2000-11-07' firstStripUrl = stripUrl % 'moving-in'
imageSearch = compile(r'<img src="(comics/.+?)"')
prevSearch = compile(r'<a href="(.+?)"><img[^>]+?src=\'drop_shadow/previous.gif\'>')
help = 'Index format: yyyy-mm-dd'
class MadamAndEve(_BasicScraper): class MadamAndEve(_BasicScraper):
@ -58,12 +55,12 @@ class MareInternum(WordPressScraper):
firstStripUrl = stripUrl % 'intro-page-1' firstStripUrl = stripUrl % 'intro-page-1'
class Marilith(_BasicScraper): class Marilith(ParserScraper):
url = 'http://www.marilith.com/' url = 'https://web.archive.org/web/20170619193143/http://www.marilith.com/'
stripUrl = url + 'archive.php?date=%s' stripUrl = url + 'archive.php?date=%s'
firstStripUrl = stripUrl % '20041215' firstStripUrl = stripUrl % '20041215'
imageSearch = compile(r'<img src="(comics/.+?)" border') imageSearch = '//img[contains(@src, "comics/")]'
prevSearch = compile(r'<a href="(archive\.php\?date=.+?)"><img border=0 name=previous_day') prevSearch = '//a[img[@name="previous_day"]]'
help = 'Index format: yyyymmdd' help = 'Index format: yyyymmdd'
@ -80,22 +77,14 @@ class MarriedToTheSea(_ParserScraper):
return '%s-%s' % (date, filename) return '%s-%s' % (date, filename)
class MarryMe(_ParserScraper): class MarryMe(ParserScraper):
url = 'http://marryme.keenspot.com/' stripUrl = 'http://marryme.keenspot.com/d/%s.html'
stripUrl = url + 'd/%s.html' url = stripUrl % '20191001'
firstStripUrl = stripUrl % '20120730' firstStripUrl = stripUrl % '20120730'
imageSearch = '//img[@class="ksc"]' imageSearch = '//img[@class="ksc"]'
prevSearch = '//a[@rel="prev"]' prevSearch = '//a[@rel="prev"]'
endOfLife = True endOfLife = True
help = 'Index format: yyyymmdd'
class MaxOveracts(_ParserScraper):
url = 'http://occasionalcomics.com/'
stripUrl = url + '%s/'
css = True
imageSearch = '#comic img'
prevSearch = '.nav-previous > a'
help = 'Index format: nnn'
class Meek(WordPressScraper): class Meek(WordPressScraper):
@ -149,16 +138,18 @@ class MisfileHellHigh(Misfile):
help = 'Index format: yyyy-mm-dd' help = 'Index format: yyyy-mm-dd'
class MistyTheMouse(WordPressScraper): class MistyTheMouse(ParserScraper):
url = 'http://www.mistythemouse.com/' url = 'http://www.mistythemouse.com/'
prevSearch = '//a[@rel="prev"]' imageSearch = '//center/p/img'
firstStripUrl = 'http://www.mistythemouse.com/?p=12' prevSearch = '//a[img[contains(@src, "Previous")]]'
firstStripUrl = url + 'The_Live_In.html'
class MonkeyUser(_ParserScraper): class MonkeyUser(ParserScraper):
url = 'https://www.monkeyuser.com/' url = 'https://www.monkeyuser.com/'
prevSearch = '//div[@title="previous"]/a'
imageSearch = '//div[d:class("content")]/p/img' imageSearch = '//div[d:class("content")]/p/img'
prevSearch = '//a[text()="Prev"]'
multipleImagesPerStrip = True
def shouldSkipUrl(self, url, data): def shouldSkipUrl(self, url, data):
# videos # videos
@ -195,43 +186,10 @@ class Moonlace(WordPressWebcomic):
return indirectStarter(self) return indirectStarter(self)
class Moonsticks(_ParserScraper): class Moonsticks(ParserScraper):
url = "http://moonsticks.org/" url = "https://moonsticks.org/"
imageSearch = "//div[@class='entry']//img" imageSearch = "//div[d:class('entry-content')]//img"
prevSearch = u"//a[text()='\u00AB Prev']" prevSearch = ('//a[@rel="prev"]', "//a[text()='\u00AB Prev']")
class MrLovenstein(_BasicScraper):
url = 'http://www.mrlovenstein.com/'
stripUrl = url + 'comic/%s'
firstStripUrl = stripUrl % '1'
imageSearch = (
# captures rollover comic
compile(tagre("div", "class", r'comic_image') + r'\s*.*\s*' +
tagre("div", "style", r'display: none;') + r'\s*.*\s' +
tagre("img", "src", r'(/images/comics/[^"]+)')),
# captures standard comic
compile(tagre("img", "src", r'(/images/comics/[^"]+)',
before="comic_main_image")),
)
prevSearch = compile(tagre("a", "href", r'([^"]+)') +
tagre("img", "src", "/images/nav_left.png"))
textSearch = compile(r'<meta name="description" content="(.+?)" />')
help = 'Index Format: n'
class MyCartoons(_BasicScraper):
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)),
)
prevSearch = compile(tagre("a", "href", r'(%spage/[^"]+)' % rurl) +
"&laquo;")
help = 'Index format: number'
lang = 'de'
class MyLifeWithFel(ParserScraper): class MyLifeWithFel(ParserScraper):

View file

@ -11,6 +11,12 @@ from ..util import tagre
from .common import WordPressScraper, WordPressNavi from .common import WordPressScraper, WordPressNavi
class OccasionalComicsDisorder(WordPressScraper):
url = 'https://occasionalcomics.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % 'latest-comic-2'
class OctopusPie(_ParserScraper): class OctopusPie(_ParserScraper):
url = 'http://www.octopuspie.com/' url = 'http://www.octopuspie.com/'
rurl = escape(url) rurl = escape(url)

View file

@ -1605,6 +1605,8 @@ class Removed(Scraper):
cls('KemonoCafe/PrincessBunny'), cls('KemonoCafe/PrincessBunny'),
cls('Lackadaisy', 'block'), cls('Lackadaisy', 'block'),
cls('MangaDex/ImTheMaxLevelNewbie', 'legal'), cls('MangaDex/ImTheMaxLevelNewbie', 'legal'),
cls('MrLovenstein', 'jsh'),
cls('MyCartoons'),
cls('StudioKhimera/Mousechevious'), cls('StudioKhimera/Mousechevious'),
cls('TalesAndTactics'), cls('TalesAndTactics'),
cls('VampireHunterBoyfriends'), cls('VampireHunterBoyfriends'),
@ -1716,5 +1718,6 @@ class Renamed(Scraper):
# Renamed in 3.1 # Renamed in 3.1
cls('Exiern', 'ComicFury/Exiern'), cls('Exiern', 'ComicFury/Exiern'),
cls('MaxOveracts', 'OccasionalComicsDisorder'),
cls('SafelyEndangered', 'WebToons/SafelyEndangered'), cls('SafelyEndangered', 'WebToons/SafelyEndangered'),
) )