From b93a8fde6533a69b9c6a5cf786cf565f27c3d2b7 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Mon, 2 May 2016 22:32:14 +0200 Subject: [PATCH] Move PensAndTales comics and fix them. --- dosagelib/plugins/e.py | 10 ++++++++++ dosagelib/plugins/f.py | 7 ++++++- dosagelib/plugins/pensandtales.py | 29 ----------------------------- 3 files changed, 16 insertions(+), 30 deletions(-) delete mode 100644 dosagelib/plugins/pensandtales.py diff --git a/dosagelib/plugins/e.py b/dosagelib/plugins/e.py index 08420e016..6f61efbb4 100644 --- a/dosagelib/plugins/e.py +++ b/dosagelib/plugins/e.py @@ -209,6 +209,16 @@ class EvilInc(_BasicScraper): help = 'Index format: stripname' +class Evilish(_ParserScraper): + url = 'http://evilish.pensandtales.com/' + stripUrl = url + '?date=%s' + firstStripUrl = stripUrl % '20020630' + imageSearch = '//img[@alt="Today\'s Comics"]' + prevSearch = '//a[img[@alt="Previous Comic"]]' + endOfLife = True + help = 'Index format: yyyymmdd' + + class Exiern(_BasicScraper): url = 'http://www.exiern.com/' rurl = escape(url) diff --git a/dosagelib/plugins/f.py b/dosagelib/plugins/f.py index 57a67518d..e995a8df0 100644 --- a/dosagelib/plugins/f.py +++ b/dosagelib/plugins/f.py @@ -9,7 +9,7 @@ from re import compile, escape, IGNORECASE from ..util import tagre from ..scraper import _BasicScraper, _ParserScraper from ..helpers import indirectStarter -from .common import _WPNaviIn +from .common import _WPNaviIn, _WordPressScraper class FalconTwin(_BasicScraper): @@ -56,6 +56,11 @@ class FilibusterCartoons(_BasicScraper): help = 'Index format: yyyy/mm/dd/name' +class FireflyCross(_WordPressScraper): + url = 'http://www.fireflycross.pensandtales.com/' + firstStripUrl = url + '?comic=05062002' + + class FirstWorldProblems(_BasicScraper): url = 'http://bradcolbow.com/archive/C5/' stripUrl = url + '%s/' diff --git a/dosagelib/plugins/pensandtales.py b/dosagelib/plugins/pensandtales.py deleted file mode 100644 index 1d625430b..000000000 --- a/dosagelib/plugins/pensandtales.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs -# Copyright (C) 2012-2014 Bastian Kleineidam -from re import compile -from ..scraper import make_scraper -from ..util import tagre - -_imageSearch = compile(tagre("img", "src", r'([^"]*wp-content/uploads/[^"]+)')) - -def add(name, baseUrl, param="date"): - classname = 'PensAndTales_%s' % name - _prevSearch = compile(tagre("span", "class", "mininav-prev") + - tagre("a", "href", r'([^"]*\?%s=[-\d]+)' % param)) - globals()[classname] = make_scraper(classname, - name='PensAndTales/' + name, - url = baseUrl, - stripUrl = baseUrl + '?' + param + '=%s', - imageSearch = _imageSearch, - prevSearch = _prevSearch, - help='Index format: yyyymmdd' - ) - - -# Most of the comics linked at pensandtales are broken and -# the rest does not have a common layout. It seems they allow -# almost arbitrary HTML layout. - -add('FireflyCross', 'http://www.fireflycross.pensandtales.com/', param="comic") -add('Evilish', 'http://evilish.pensandtales.com/')