Fix (and simplify) GoComics expressions (fixes #117)

This commit is contained in:
Tobias Gruetzmacher 2018-07-14 11:00:27 +02:00
parent 6ba1e49bfd
commit 49ec3cc3fa

View file

@ -11,11 +11,9 @@ from ..helpers import indirectStarter, xpath_class
class GoComics(_ParserScraper): class GoComics(_ParserScraper):
url = 'http://www.gocomics.com/' url = 'http://www.gocomics.com/'
imageSearch = '//picture[{0}]/img'.format(xpath_class('item-comic-image')) imageSearch = '//picture[{}]/img'.format(xpath_class('item-comic-image'))
navSearch = '//div[{0}]//a[{1}]' prevSearch = '//a[{}]'.format(xpath_class('js-previous-comic'))
prevSearch = navSearch.format(xpath_class('comic'), xpath_class('fa-caret-left')) latestSearch = '//div[{}]//a'.format(xpath_class('gc-deck--cta-0'))
nextSearch = navSearch.format(xpath_class('comic'), xpath_class('fa-caret-right'))
latestSearch = navSearch.format(xpath_class('gc-deck--cta-0'), xpath_class(''))
starter = indirectStarter starter = indirectStarter
help = 'Index format: yyyy/mm/dd' help = 'Index format: yyyy/mm/dd'