diff --git a/dosagelib/plugins/common.py b/dosagelib/plugins/common.py index d9757632f..009d8945c 100644 --- a/dosagelib/plugins/common.py +++ b/dosagelib/plugins/common.py @@ -33,6 +33,8 @@ class _WPNaviIn(_WordPressScraper): class _ComicControlScraper(_ParserScraper): imageSearch = '//img[@id="cc-comic"]' prevSearch = '//a[@rel="prev"]' + nextSearch = '//a[@rel="next"]' + latestSearch = '//a[@rel="last"]' class _TumblrScraper(_ParserScraper): diff --git a/dosagelib/plugins/w.py b/dosagelib/plugins/w.py index 778117d2c..e3c8d0471 100644 --- a/dosagelib/plugins/w.py +++ b/dosagelib/plugins/w.py @@ -9,7 +9,7 @@ from re import compile, escape, IGNORECASE from ..scraper import _BasicScraper, _ParserScraper from ..util import tagre -from ..helpers import indirectStarter, xpath_class +from ..helpers import bounceStarter, indirectStarter, xpath_class from .common import _ComicControlScraper, _WordPressScraper @@ -75,6 +75,16 @@ class WhiteNoise(_WordPressScraper): prevSearch = '//a[%s]' % xpath_class('previous-webcomic-link') +class WhiteNoiseLee(_ComicControlScraper): + url = 'http://www.white-noise-comic.com/' + stripUrl = url + 'comic/%s' + firstStripUrl = stripUrl % '1-0' + starter = bounceStarter + + def namer(self, imageUrl, pageUrl): + return pageUrl.rsplit('/', 1)[-1] + '.' + imageUrl.rsplit('.', 1)[-1] + + class Whomp(_ComicControlScraper): url = 'http://www.whompcomic.com/' firstStripUrl = url + 'comic/06152010'