Fix PvPOnline (fixes #299)

Use a "working" latest page. (Additionally, mark the comic as "end of
life", since it hasn't been updated in 2 years...)
This commit is contained in:
Tobias Gruetzmacher 2024-02-15 23:21:24 +01:00
parent ea2bad5500
commit 3c203dae72
No known key found for this signature in database

View file

@ -1,8 +1,8 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # SPDX-FileCopyrightText: © 2004 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam # SPDX-FileCopyrightText: © 2012 Bastian Kleineidam
# Copyright (C) 2015-2022 Tobias Gruetzmacher # SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring # SPDX-FileCopyrightText: © 2019 Daniel Ring
from re import compile, escape from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper, ParserScraper from ..scraper import _BasicScraper, _ParserScraper, ParserScraper
@ -333,11 +333,12 @@ class PS238(_ParserScraper):
class PvPOnline(ParserScraper): class PvPOnline(ParserScraper):
baseUrl = 'https://www.toonhoundstudios.com/' baseUrl = 'https://www.toonhoundstudios.com/'
url = baseUrl + 'pvp/' stripUrl = baseUrl + 'comic/%s/?sid=372'
stripUrl = baseUrl + 'comic/%s/' url = stripUrl % 'pvp-2022-09-16'
firstStripUrl = stripUrl % '19980504' firstStripUrl = stripUrl % '19980504'
imageSearch = '//div[@id="spliced-comic"]//img/@data-src-img' imageSearch = '//div[@id="spliced-comic"]//img/@data-src-img'
prevSearch = '//a[d:class("prev")]' prevSearch = '//a[d:class("prev")]'
endOfLife = True
def namer(self, imageUrl, pageUrl): def namer(self, image_url, page_url):
return 'pvp' + imageUrl.rsplit('/', 1)[-1] return 'pvp' + image_url.rsplit('/', 1)[-1]