From ca2c0cd6edefc1942fdf8f23468680ecdfe39971 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Fri, 27 May 2022 20:36:02 +0200 Subject: [PATCH] Fix PennyArcade (fixes #213) Unfortunatly, images are now split into panels, so some re-assembly might be required... --- dosagelib/plugins/p.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dosagelib/plugins/p.py b/dosagelib/plugins/p.py index 4f6fbce8a..96407b2ce 100644 --- a/dosagelib/plugins/p.py +++ b/dosagelib/plugins/p.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam -# Copyright (C) 2015-2020 Tobias Gruetzmacher +# Copyright (C) 2015-2022 Tobias Gruetzmacher # Copyright (C) 2019-2020 Daniel Ring from re import compile, escape @@ -102,17 +102,14 @@ class PennyAndAggie(_BasicScraper): class PennyArcade(_ParserScraper): url = 'https://www.penny-arcade.com/comic/' stripUrl = url + '%s' - firstStripUrl = stripUrl % '1998/11/18' - imageSearch = '//div[@id="comicFrame"]//img' - prevSearch = '//a[d:class("btnPrev")]' - nextSearch = '//a[d:class("btnNext")]' + firstStripUrl = stripUrl % '1998/11/18/the-sin-of-long-load-times' + imageSearch = '//div[d:class("comic-panel")]//img' + prevSearch = '//a[d:class("older")]' + nextSearch = '//a[d:class("newer")]' + multipleImagesPerStrip = True starter = bounceStarter help = 'Index format: yyyy/mm/dd' - def namer(self, image_url, page_url): - p = page_url.split('/') - return '%04d%02d%02d' % (int(p[4]), int(p[5]), int(p[6])) - class PeppermintSaga(_WPNavi): url = 'http://www.pepsaga.com/'