2012-06-20 20:41:04 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2013-02-05 18:51:46 +00:00
|
|
|
# Copyright (C) 2012-2013 Bastian Kleineidam
|
2012-11-21 20:57:26 +00:00
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
from re import compile
|
2012-10-11 10:03:12 +00:00
|
|
|
from ..scraper import _BasicScraper
|
2012-11-26 06:13:32 +00:00
|
|
|
from ..util import tagre
|
|
|
|
from ..helpers import bounceStarter
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2012-12-07 23:45:18 +00:00
|
|
|
class ZapComic(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.zapcomic.com/'
|
|
|
|
stripUrl = url + '%s/'
|
2012-12-07 23:45:18 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.zapcomic\.com\?comic_object=\d+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.zapcomic\.com/[^"]+)', after="previous-comic-link"))
|
|
|
|
help = 'Index format: yyyy/mm/nnn-stripname'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class Zapiro(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.mg.co.za/zapiro/'
|
|
|
|
starter = bounceStarter(url,
|
2012-11-26 06:13:32 +00:00
|
|
|
compile(tagre("a", "href", r'(http://mg\.co\.za/cartoon/[^"]+)')+"Newer"))
|
|
|
|
stripUrl = 'http://mg.co.za/cartoon/%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://cdn\.mg\.co\.za/crop/content/cartoons/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://mg\.co\.za/cartoon/[^"]+)')+"Older")
|
|
|
|
help = 'Index format: yyyy-mm-dd-stripname'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2012-12-04 06:02:40 +00:00
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
name = imageUrl.split('/')[-3]
|
|
|
|
return name
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2012-12-07 23:45:18 +00:00
|
|
|
class ZebraGirl(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.zebragirl.net/'
|
|
|
|
stripUrl = url + '?date=%s'
|
2012-12-07 23:45:18 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r"(comics/[^']+)", quote="'"))
|
|
|
|
prevSearch = compile(tagre("link", "href", r"(/\?date=[^']+)", quote="'", before='Previous'))
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class ZombieHunters(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.thezombiehunters.com/'
|
|
|
|
stripUrl = url + '?strip_id=%s'
|
2012-11-26 06:13:32 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/istrip_files/strips/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(\?strip_id=\d+)') + tagre("img", "id", "prevcomic"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n(unpadded)'
|
2013-03-07 22:51:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Zwarwald(_BasicScraper):
|
|
|
|
url = "http://www.zwarwald.de/"
|
|
|
|
stripUrl = url + 'index.php/page/%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.zwarwald\.de/images/\d+/\d+/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.zwarwald\.de/index\.php/page/\d+/)') +
|
|
|
|
tagre("img", "src", r'http://zwarwald\.de/images/prev\.jpg', quote="'"))
|
|
|
|
help = 'Index format: number'
|
2013-03-08 05:47:00 +00:00
|
|
|
waitSeconds = 1
|
2013-03-07 22:51:55 +00:00
|
|
|
|
|
|
|
def shouldSkipUrl(self, url):
|
2013-03-08 05:47:00 +00:00
|
|
|
return url in (self.stripUrl % "112",)
|