Merge Gaia(German), SandraAndWoo(German) into common base.
This also fixes #97 by correcting the imageSearch regex.
This commit is contained in:
parent
b710d3fa81
commit
b5368b366a
3 changed files with 30 additions and 43 deletions
|
@ -8,26 +8,6 @@ from ..scraper import _BasicScraper
|
|||
from ..helpers import indirectStarter
|
||||
from ..util import tagre
|
||||
|
||||
class Gaia(_BasicScraper):
|
||||
description = u'Gaia, a story about the nature of reality, and the answer to Lilith?s simple, meek, world-shattering question: ?Will you come along??'
|
||||
url = 'http://www.sandraandwoo.com/gaia/'
|
||||
rurl = escape(url)
|
||||
stripUrl = url + '%s/'
|
||||
firstStripUrl = stripUrl % '2000/01/01/welcome-to-gaia/'
|
||||
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+-[^"]+)' % rurl))
|
||||
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev"))
|
||||
help = 'Index format: yyyy/mm/dd/number-stripname'
|
||||
|
||||
class GaiaGerman(_BasicScraper):
|
||||
description = u'Gaia, eine Geschichte über das Wesen der Wirklichkeit und die Antwort auf Liliths einfache, bescheidene, welterschütternde Frage: ?Kommt ihr mit??'
|
||||
url = 'http://www.sandraandwoo.com/gaiade/'
|
||||
rurl = escape(url)
|
||||
stripUrl = url + '%s/'
|
||||
firstStripUrl = stripUrl % '2000/01/01/welcome-to-gaia/'
|
||||
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+-[^"]+)' % rurl))
|
||||
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev"))
|
||||
help = 'Index format: yyyy/mm/dd/number-stripname'
|
||||
lang = 'de'
|
||||
|
||||
class Galaxion(_BasicScraper):
|
||||
description = u'Galaxion - Life. Love. Hyperspace.'
|
||||
|
|
|
@ -57,29 +57,6 @@ class SamAndFuzzy(_BasicScraper):
|
|||
prevSearch = compile(r'"><a href="(.+?)"><img src="imgint/nav_prev.gif"')
|
||||
help = 'Index format: nnnn'
|
||||
|
||||
|
||||
class SandraAndWoo(_BasicScraper):
|
||||
description = u'Sandra and Woo: a webcomic about friendship, life and the art of (not) eating squirrels, featuring the girl Sandra and her pet raccoon Woo.'
|
||||
url = 'http://www.sandraandwoo.com/'
|
||||
rurl = escape(url)
|
||||
stripUrl = url + '%s/'
|
||||
firstStripUrl = stripUrl % '2000/01/01/welcome-to-sandra-and-woo'
|
||||
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+-[^"]+)' % rurl))
|
||||
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev"))
|
||||
help = 'Index format: yyyy/mm/dd/number-stripname'
|
||||
|
||||
|
||||
class SandraAndWooGerman(_BasicScraper):
|
||||
description = u'Sandra und Woo: ein Webcomic \xfcber Freundschaft, das Leben und die Kunst (keine) Eichh\xf6rnchen zu essen; mit dem M\xe4dchen Sandra und ihrem Waschb\xe4ren Woo in den Hauptrollen'
|
||||
url = 'http://www.sandraandwoo.com/woode/'
|
||||
rurl = escape(url)
|
||||
stripUrl = url + '%s/'
|
||||
firstStripUrl = stripUrl % '2008/10/19/ein-ausgefuchster-waschbar'
|
||||
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+-[^"]+)' % rurl))
|
||||
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev"))
|
||||
help = 'Index format: yyyy/mm/dd/number-stripname'
|
||||
lang = 'de'
|
||||
|
||||
class SandraOnTheRocks(_BasicScraper):
|
||||
url = 'http://www.sandraontherocks.com/'
|
||||
stripUrl = url + 'strips-sotr/%s'
|
||||
|
|
30
dosagelib/plugins/sandraandwoo.py
Normal file
30
dosagelib/plugins/sandraandwoo.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
||||
# Copyright (C) 2012-2014 Bastian Kleineidam
|
||||
from re import compile, escape
|
||||
from ..scraper import make_scraper
|
||||
from ..util import tagre
|
||||
|
||||
|
||||
def add(name, urlName, firstUrl, lang=None):
|
||||
baseUrl = 'http://www.sandraandwoo.com/' + urlName
|
||||
rurl = escape(baseUrl)
|
||||
|
||||
attrs = dict(
|
||||
name = name,
|
||||
url = baseUrl,
|
||||
stripUrl = baseUrl + '%s/',
|
||||
firstStripUrl = '%s/%s/' % (baseUrl, firstUrl),
|
||||
imageSearch = compile(tagre("img", "src", r'(/%scomics/\d+-\d+-\d+-[^"]+)' % urlName)),
|
||||
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev")),
|
||||
help='Index format: yyyy/mm/dd/(number-)stripname',
|
||||
)
|
||||
if lang:
|
||||
attrs['lang'] = lang
|
||||
globals()[name] = make_scraper(name, **attrs)
|
||||
|
||||
add('Gaia', 'gaia/', '2000/01/01/welcome-to-gaia/')
|
||||
add('GaiaGerman', 'gaiade/', '2000/01/01/welcome-to-gaia', lang='de')
|
||||
add('SandraAndWoo', '', '2000/01/01/welcome-to-sandra-and-woo')
|
||||
add('SandraAndWooGerman', 'woode/', '2008/10/19/ein-ausgefuchster-waschbar', lang='de')
|
||||
|
Loading…
Reference in a new issue