From bd73584ba94115f20a849aed4a5e354e763e0402 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Mon, 6 Jun 2022 16:12:53 +0200 Subject: [PATCH] Fix ToonHole --- dosagelib/plugins/t.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dosagelib/plugins/t.py b/dosagelib/plugins/t.py index 6051016bc..ba41db60a 100644 --- a/dosagelib/plugins/t.py +++ b/dosagelib/plugins/t.py @@ -9,8 +9,8 @@ try: except ImportError: from cached_property import cached_property -from ..scraper import _BasicScraper, _ParserScraper -from ..helpers import indirectStarter +from ..scraper import _BasicScraper, _ParserScraper, ParserScraper +from ..helpers import indirectStarter, joinPathPartsNamer from ..util import tagre from .common import (ComicControlScraper, WordPressScraper, WordPressSpliced, WordPressNavi, WordPressWebcomic) @@ -280,12 +280,14 @@ class TinyDickAdventures(_ParserScraper): return page + '.' + ext -class ToonHole(WordPressScraper): - url = 'http://toonhole.com/' - firstStripUrl = url + 'comic/toon-hole-coming-soon-2010/' - - def shouldSkipUrl(self, url, data): - return url in (self.url + "comic/if-game-of-thrones-was-animated/",) +class ToonHole(ParserScraper): + url = 'https://toonhole.com/' + firstStripUrl = url + '2010/01/smart-questions-get-smart-answers/' + imageSearch = '//img[d:class("wp-post-image")]' + prevSearch = '//a[@rel="prev"]' + latestSearch = '//a[@rel="bookmark"]' + starter = indirectStarter + namer = joinPathPartsNamer((), (-3, -2, -1)) class TrippingOverYou(_BasicScraper):