From 2fcd8d92f29544994e68c01be92e914b8dc5c7dc Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sun, 18 Oct 2020 20:44:47 +0200 Subject: [PATCH] Fix GeeksNextDoor (& switch to ParserScraper) --- dosagelib/plugins/g.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dosagelib/plugins/g.py b/dosagelib/plugins/g.py index 17bb287bd..0a96aeef2 100644 --- a/dosagelib/plugins/g.py +++ b/dosagelib/plugins/g.py @@ -47,13 +47,15 @@ class Geeks(_ParserScraper): help = 'Index format: nnn' -class GeeksNextDoor(_BasicScraper): +class GeeksNextDoor(_ParserScraper): url = 'http://www.geeksnextcomic.com/' stripUrl = url + '%s.html' - firstStripUrl = stripUrl % '2010-10-04' - imageSearch = compile(tagre("img", "src", r'(images/GND\d+[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(\d+-\d+-\d+\.html)') + - tagre("img", "src", r'images/nav_prev\.png')) + firstStripUrl = stripUrl % '2007-03-27' # '2010-10-04' + imageSearch = '//p/img' + prevSearch = ( + '//a[img[contains(@src, "/nav_prev")]]', + '//a[contains(text(), "< prev")]', # start page is different + ) help = 'Index format: yyyy-mm-dd'