Fix some comics.

This commit is contained in:
Bastian Kleineidam 2013-03-19 20:45:18 +01:00
parent 353e96f428
commit 17fe58b864
4 changed files with 11 additions and 14 deletions

View file

@ -76,8 +76,8 @@ class ALessonIsLearned(_BasicScraper):
class Alice(_BasicScraper): class Alice(_BasicScraper):
url = 'http://alice.alicecomics.com/' url = 'http://alice.alicecomics.com/'
stripUrl = url + '%s/' stripUrl = url + '%s/'
imageSearch = compile(tagre("img", "src", r'(http://alice\.alicecomics\.com/wp-content/webcomic/alicecomics/[^"]+)')) 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/archive/[^"]+)', after="previous")) prevSearch = compile(tagre("a", "href", r'(http://alice\.alicecomics\.com/alicecomics/[^"]+)', after="previous"))
help = 'Index format: name' help = 'Index format: name'

View file

@ -107,6 +107,7 @@ class DieselSweeties(_BasicScraper):
class Dilbert(_BasicScraper): class Dilbert(_BasicScraper):
url = 'http://dilbert.com/' url = 'http://dilbert.com/'
stripUrl = url + '%s/' stripUrl = url + '%s/'
firstStripUrl = stripUrl % '1989-04-16'
starter = bounceStarter(url, starter = bounceStarter(url,
compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Next"))) compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Next")))
prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev")) prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev"))
@ -179,14 +180,6 @@ class Dracula(_BasicScraper):
help = 'Index format: nnn' 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): class DreamKeepersPrelude(_BasicScraper):
url = 'http://www.dreamkeeperscomic.com/Prelude.php' url = 'http://www.dreamkeeperscomic.com/Prelude.php'
stripUrl = url + '?pg=%s' stripUrl = url + '?pg=%s'

View file

@ -30,7 +30,7 @@ class OddFish(_BasicScraper):
class Oglaf(_BasicScraper): class Oglaf(_BasicScraper):
url = 'http://oglaf.com/' url = 'http://oglaf.com/'
stripUrl = url + '%s/' 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")) prevSearch = compile(tagre("a", "href", r'([^"]+)') + tagre("div", "id", "pvs"))
help = 'Index format: stripname/nn' help = 'Index format: stripname/nn'

View file

@ -10,7 +10,11 @@ from ..util import tagre
class YAFGC(_BasicScraper): class YAFGC(_BasicScraper):
url = 'http://yafgc.net/' url = 'http://yafgc.net/'
stripUrl = url + '?id=%s' stripUrl = url + '?id=%s'
imageSearch = compile(tagre("img", "src", r'(http://yafgc\.net/img/comic/\d+\.jpg)')) imageSearch = compile(tagre("img", "src", r'(http://(?:www\.)?yafgc\.net/img/comic/\d+\.jpg)'))
prevSearch = compile(tagre("a", "href", r'(http://yafgc\.net/\?id=\d+)') + prevSearch = compile(tagre("a", "href", r'(http://(?:www\.)?yafgc\.net/\?id=\d+)') +
tagre("img", "src", r'/img/navbar/go_to_previous\.gif')) 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")