From 731291979dc50beb6404b34d0a91405b8c90a70d Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Mon, 22 Sep 2014 22:14:31 +0200 Subject: [PATCH] Fixed RedMeat. --- doc/changelog.txt | 2 ++ dosagelib/plugins/r.py | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index 5b46a5397..b02c6e9c1 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -4,6 +4,8 @@ Fixes: - output: Don't crash when HTML output is run more than once per day. Closes: GH bug #78 +- comics: Fixed RedMeat + Closes: GH bug #77 Dosage 2.15 (released 3.7.2014) diff --git a/dosagelib/plugins/r.py b/dosagelib/plugins/r.py index 1d1e6f0db..5dc2a8013 100644 --- a/dosagelib/plugins/r.py +++ b/dosagelib/plugins/r.py @@ -38,16 +38,14 @@ class RealmOfAtland(_BasicScraper): class RedMeat(_BasicScraper): baseUrl = 'http://www.redmeat.com/redmeat/' url = baseUrl + 'current/index.html' - starter = bounceStarter(url, compile(r'next')) + starter = bounceStarter(url, + compile(tagre("a", "href", r'(http://www\.redmeat\.com/[^"]*)', after="next"))) stripUrl = baseUrl + '%s/index.html' firstStripUrl = stripUrl % '1996-06-10' - imageSearch = compile(r']*>') - prevSearch = compile(r'previous') + imageSearch = compile(tagre("img", "src", r'(http://www\.redmeat\.com/imager/b/redmeat/[^"]*\.png)')) + prevSearch = compile(tagre("a", "href", r'(http://www\.redmeat\.com/[^"]*)', after="prev")) help = 'Index format: yyyy-mm-dd' - @classmethod - def namer(cls, imageUrl, pageUrl): - return imageUrl.split('/')[-2] class RedsPlanet(_BasicScraper): description = u"Red's Planet"