From ea2bad55000803e0eb59595aa87af19230467bd6 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Thu, 15 Feb 2024 00:50:33 +0100 Subject: [PATCH] Fix some more comic modules --- dosagelib/plugins/m.py | 90 +++++++++++----------------------------- dosagelib/plugins/o.py | 6 +++ dosagelib/plugins/old.py | 3 ++ 3 files changed, 33 insertions(+), 66 deletions(-) diff --git a/dosagelib/plugins/m.py b/dosagelib/plugins/m.py index c60c184a5..d69531e36 100644 --- a/dosagelib/plugins/m.py +++ b/dosagelib/plugins/m.py @@ -4,7 +4,7 @@ # SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher # SPDX-FileCopyrightText: © 2019 Daniel Ring import json -from re import compile, escape, IGNORECASE +from re import compile, IGNORECASE from ..helpers import indirectStarter from ..scraper import ParserScraper, _BasicScraper, _ParserScraper @@ -13,13 +13,10 @@ from ..xml import NS from .common import ComicControlScraper, WordPressScraper, WordPressWebcomic -class MacHall(_BasicScraper): - url = 'http://www.machall.com/' - stripUrl = url + 'view.php?date=%s' - firstStripUrl = stripUrl % '2000-11-07' - imageSearch = compile(r']+?src=\'drop_shadow/previous.gif\'>') - help = 'Index format: yyyy-mm-dd' +class MacHall(ComicControlScraper): + url = 'https://www.machall.com/' + stripUrl = url + 'comic/%s' + firstStripUrl = stripUrl % 'moving-in' class MadamAndEve(_BasicScraper): @@ -58,12 +55,12 @@ class MareInternum(WordPressScraper): firstStripUrl = stripUrl % 'intro-page-1' -class Marilith(_BasicScraper): - url = 'http://www.marilith.com/' +class Marilith(ParserScraper): + url = 'https://web.archive.org/web/20170619193143/http://www.marilith.com/' stripUrl = url + 'archive.php?date=%s' firstStripUrl = stripUrl % '20041215' - imageSearch = compile(r'') - 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) + - "«") - help = 'Index format: number' - lang = 'de' +class Moonsticks(ParserScraper): + url = "https://moonsticks.org/" + imageSearch = "//div[d:class('entry-content')]//img" + prevSearch = ('//a[@rel="prev"]', "//a[text()='\u00AB Prev']") class MyLifeWithFel(ParserScraper): diff --git a/dosagelib/plugins/o.py b/dosagelib/plugins/o.py index 5706d2ba2..2f85ee765 100644 --- a/dosagelib/plugins/o.py +++ b/dosagelib/plugins/o.py @@ -11,6 +11,12 @@ from ..util import tagre from .common import WordPressScraper, WordPressNavi +class OccasionalComicsDisorder(WordPressScraper): + url = 'https://occasionalcomics.com/' + stripUrl = url + 'comic/%s/' + firstStripUrl = stripUrl % 'latest-comic-2' + + class OctopusPie(_ParserScraper): url = 'http://www.octopuspie.com/' rurl = escape(url) diff --git a/dosagelib/plugins/old.py b/dosagelib/plugins/old.py index 1c37f90c5..4ca85ba18 100644 --- a/dosagelib/plugins/old.py +++ b/dosagelib/plugins/old.py @@ -1605,6 +1605,8 @@ class Removed(Scraper): cls('KemonoCafe/PrincessBunny'), cls('Lackadaisy', 'block'), cls('MangaDex/ImTheMaxLevelNewbie', 'legal'), + cls('MrLovenstein', 'jsh'), + cls('MyCartoons'), cls('StudioKhimera/Mousechevious'), cls('TalesAndTactics'), cls('VampireHunterBoyfriends'), @@ -1716,5 +1718,6 @@ class Renamed(Scraper): # Renamed in 3.1 cls('Exiern', 'ComicFury/Exiern'), + cls('MaxOveracts', 'OccasionalComicsDisorder'), cls('SafelyEndangered', 'WebToons/SafelyEndangered'), )