diff --git a/dosagelib/plugins/a.py b/dosagelib/plugins/a.py index 2fcdc8ea3..703c40d1b 100644 --- a/dosagelib/plugins/a.py +++ b/dosagelib/plugins/a.py @@ -76,8 +76,8 @@ class ALessonIsLearned(_BasicScraper): class Alice(_BasicScraper): url = 'http://alice.alicecomics.com/' stripUrl = url + '%s/' - imageSearch = compile(tagre("img", "src", r'(http://alice\.alicecomics\.com/wp-content/webcomic/alicecomics/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(http://alice\.alicecomics\.com/archive/[^"]+)', after="previous")) + imageSearch = compile(tagre("img", "src", r'(http://alice\.alicecomics\.com/wp-content/uploads/\d+/\d+/\d+-\d+-\d+[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(http://alice\.alicecomics\.com/alicecomics/[^"]+)', after="previous")) help = 'Index format: name' diff --git a/dosagelib/plugins/d.py b/dosagelib/plugins/d.py index 7d9b275e2..f872d3791 100644 --- a/dosagelib/plugins/d.py +++ b/dosagelib/plugins/d.py @@ -107,6 +107,7 @@ class DieselSweeties(_BasicScraper): class Dilbert(_BasicScraper): url = 'http://dilbert.com/' stripUrl = url + '%s/' + firstStripUrl = stripUrl % '1989-04-16' 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")) @@ -179,14 +180,6 @@ class Dracula(_BasicScraper): help = 'Index format: nnn' -class DragonTails(_BasicScraper): - url = 'http://www.dragon-tails.com/' - stripUrl = url + 'archive.php?date=%s' - imageSearch = compile(r'"(newcomic/.+?)"') - prevSearch = compile(r'"(archive.+?)">.+n_2') - help = 'Index format: yyyy-mm-dd' - - class DreamKeepersPrelude(_BasicScraper): url = 'http://www.dreamkeeperscomic.com/Prelude.php' stripUrl = url + '?pg=%s' diff --git a/dosagelib/plugins/o.py b/dosagelib/plugins/o.py index eb5c3e87d..b9edae68e 100644 --- a/dosagelib/plugins/o.py +++ b/dosagelib/plugins/o.py @@ -30,7 +30,7 @@ class OddFish(_BasicScraper): class Oglaf(_BasicScraper): url = 'http://oglaf.com/' stripUrl = url + '%s/' - imageSearch = compile(tagre("img", "src", r'(/media/comic/[^"]+)', before="strip")) + imageSearch = compile(tagre("img", "src", r'(/media-haha/comic/[^"]+)', before="strip")) prevSearch = compile(tagre("a", "href", r'([^"]+)') + tagre("div", "id", "pvs")) help = 'Index format: stripname/nn' diff --git a/dosagelib/plugins/y.py b/dosagelib/plugins/y.py index 2ddebf4b2..475cdaa73 100644 --- a/dosagelib/plugins/y.py +++ b/dosagelib/plugins/y.py @@ -10,7 +10,11 @@ from ..util import tagre class YAFGC(_BasicScraper): url = 'http://yafgc.net/' stripUrl = url + '?id=%s' - imageSearch = compile(tagre("img", "src", r'(http://yafgc\.net/img/comic/\d+\.jpg)')) - prevSearch = compile(tagre("a", "href", r'(http://yafgc\.net/\?id=\d+)') + + imageSearch = compile(tagre("img", "src", r'(http://(?:www\.)?yafgc\.net/img/comic/\d+\.jpg)')) + prevSearch = compile(tagre("a", "href", r'(http://(?:www\.)?yafgc\.net/\?id=\d+)') + tagre("img", "src", r'/img/navbar/go_to_previous\.gif')) - help = 'Index format: n' + help = 'Index format: number' + + def prevUrlModifier(cls, prevUrl): + if prevUrl: + return prevUrl.replace("www.yafgc.net", "yafgc.net")