From 178d8f80b2745c48b785d0dbb91e8ab43b82f7ad Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Mon, 18 Mar 2013 18:15:19 +0100 Subject: [PATCH] Fix Dilbert image naming. --- doc/changelog.txt | 4 ++++ dosagelib/plugins/d.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index 19f06905a..430fafdcd 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -13,6 +13,10 @@ Changes: - comics: Continue searching for images if one image is not found. Closes: GH bug #18 +Fixes: +- comics: Fix dilbert image naming. + Closes: GH bug #20 + Dosage 1.13 (released 11.3.2013) diff --git a/dosagelib/plugins/d.py b/dosagelib/plugins/d.py index a0e8f162a..7d9b275e2 100644 --- a/dosagelib/plugins/d.py +++ b/dosagelib/plugins/d.py @@ -5,7 +5,7 @@ from re import compile from ..scraper import _BasicScraper -from ..helpers import indirectStarter +from ..helpers import indirectStarter, bounceStarter from ..util import tagre @@ -107,6 +107,8 @@ class DieselSweeties(_BasicScraper): class Dilbert(_BasicScraper): url = 'http://dilbert.com/' stripUrl = url + '%s/' + starter = bounceStarter(url, + compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Next"))) prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev")) imageSearch = compile(tagre("img", "src", r'(/dyn/str_strip/[^"]+\.strip\.zoom\.gif)')) help = 'Index format: yyyy-mm-dd'