2016-04-01 22:14:31 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
|
|
|
# Copyright (C) 2015-2016 Tobias Gruetzmacher
|
|
|
|
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
|
|
|
|
from ..scraper import _ParserScraper
|
|
|
|
|
|
|
|
# Common base classes for comics with the same structure (same hosting
|
|
|
|
# software, for example) go here. Since those are shared by many modules,
|
|
|
|
# please don't use lists of expression, as that makes it hard to track which
|
|
|
|
# expression is for which comics.
|
|
|
|
|
|
|
|
|
2016-04-03 20:58:01 +00:00
|
|
|
WP_LATEST_SEARCH = '//a[contains(concat(" ", @class, " "), " comic-nav-last ")]'
|
|
|
|
|
|
|
|
|
2016-04-01 22:14:31 +00:00
|
|
|
class _WordPressScraper(_ParserScraper):
|
|
|
|
imageSearch = '//div[@id="comic"]//img'
|
|
|
|
prevSearch = "//a[contains(concat(' ', @class, ' '), ' comic-nav-previous ')]"
|
|
|
|
|
|
|
|
|
|
|
|
class _ComicPressScraper(_WordPressScraper):
|
|
|
|
prevSearch = "//a[contains(concat(' ', @class, ' '), ' navi-prev-in ')]"
|
2016-04-03 22:12:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
class _ComicControlScraper(_ParserScraper):
|
|
|
|
imageSearch = '//img[@id="cc-comic"]'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|