2012-11-26 06:13:32 +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-26 06:13:32 +00:00
|
|
|
|
|
|
|
from re import compile, IGNORECASE, DOTALL
|
|
|
|
from ..scraper import make_scraper
|
|
|
|
|
2012-11-28 17:15:12 +00:00
|
|
|
_imageSearch = compile(r'<a name="strip\d*?">.*?<img[^>]+?src="([^"]*?memberimages/.+?)"', IGNORECASE + DOTALL)
|
|
|
|
_prevSearch = compile(r'href="([^"]*?whichbutton=prev[^"]*?)"', IGNORECASE)
|
|
|
|
|
2012-11-26 06:13:32 +00:00
|
|
|
|
|
|
|
def add(name, subpath):
|
|
|
|
baseUrl = 'http://www.webcomicsnation.com/'
|
|
|
|
classname = 'WebcomicsNation_%s' % name
|
|
|
|
globals()[classname] = make_scraper(classname,
|
|
|
|
name = 'WebcomicsNation/' + name,
|
2013-02-04 20:00:26 +00:00
|
|
|
url = baseUrl + subpath,
|
2012-11-26 06:13:32 +00:00
|
|
|
stripUrl = baseUrl + '?view=archive&chapter=%s',
|
2012-11-28 17:15:12 +00:00
|
|
|
imageSearch = _imageSearch,
|
2012-12-05 20:52:52 +00:00
|
|
|
multipleImagesPerStrip = True,
|
2012-11-28 17:15:12 +00:00
|
|
|
prevSearch = _prevSearch,
|
2012-12-05 20:52:52 +00:00
|
|
|
# the prevSearch is a redirect
|
|
|
|
prevUrlMatchesStripUrl = False,
|
2012-11-26 06:13:32 +00:00
|
|
|
help = 'Index format: nnnn (non-contiguous)',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
add('AgnesQuill', 'daveroman/agnes/')
|
|
|
|
add('MyMuse', 'gc/muse/')
|
|
|
|
add('NekkoAndJoruba', 'nekkoandjoruba/nekkoandjoruba/')
|
2013-11-12 17:33:14 +00:00
|
|
|
# custom navigation
|
|
|
|
#add('ClownSamurai', 'qsamurai/clownsamurai/')
|