From e7410ce26b5f92c1cfffe803c430c0f89c09e92e Mon Sep 17 00:00:00 2001 From: erpbridge Date: Sun, 12 Aug 2018 17:39:51 -0400 Subject: [PATCH] Update for new LookingForGroup site format (#123) Site uses a WordPress build, but does not explicitly match any existing scrapers. Fixes #120. --- dosagelib/plugins/l.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dosagelib/plugins/l.py b/dosagelib/plugins/l.py index cb051dfbe..d68bca7d4 100644 --- a/dosagelib/plugins/l.py +++ b/dosagelib/plugins/l.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function from re import compile, escape from ..scraper import _BasicScraper, _ParserScraper -from ..helpers import bounceStarter, indirectStarter +from ..helpers import bounceStarter, indirectStarter, xpath_class from ..util import tagre from .common import (_ComicControlScraper, _WordPressScraper, _WPNaviIn, WP_LATEST_SEARCH) @@ -94,12 +94,9 @@ class LoFiJinks(_WPNaviIn): class LookingForGroup(_ParserScraper): - url = 'http://www.lfg.co/' - stripUrl = url + 'page/%s/' + url = 'http://www.lfg.co/latest-comic/' + stripUrl = 'http://www.lfg.co/page/%s/' firstStripUrl = stripUrl % '1' - css = True - imageSearch = '#comic img' - prevSearch = '#comic-left > a' - latestSearch = '#header-dropdown-comic-lfg > a:nth-of-type(2)' - starter = indirectStarter + imageSearch = '//div[@id="comic-img"]//img' + prevSearch = '//a[%s]' % xpath_class('comic-nav-prev') help = 'Index format: nnn'