Add DMFA side stories

(this also moves all DMFA modules into their own file)
This commit is contained in:
Techwolf 2019-06-13 23:11:22 -07:00 committed by Tobias Gruetzmacher
parent b79f22fb65
commit a6aacf0cc7
2 changed files with 46 additions and 11 deletions

View file

@ -163,17 +163,6 @@ class Dilbert(_ParserScraper):
return "%s" % name
class DMFA(_BasicScraper):
url = 'http://www.missmab.com/'
stripUrl = url + 'Comics/Vol_%s.php'
firstStripUrl = stripUrl % '001'
imageSearch = compile(tagre("img", "src", r'((?:Comics/|Vol)[^"]+)'))
multipleImagesPerStrip = True
prevSearch = compile(tagre("a", "href", r'((?:Comics/)?Vol[^"]+)') +
tagre("img", "src", r'(?:../)?Images/comicprev\.gif'))
help = 'Index format: nnn (normally, some specials)'
class DoemainOfOurOwn(_ParserScraper):
url = 'http://www.doemain.com/'
stripUrl = url + 'index.cgi/%s'

46
dosagelib/plugins/dmfa.py Normal file
View file

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
from ..helpers import bounceStarter
from .common import _ParserScraper
class DMFA(_ParserScraper):
url = 'http://www.missmab.com/'
stripUrl = url + 'Comics/%s.php'
imageSearch = '//center//img'
prevSearch = '//a[./img[contains(@src, "comicprev")]]'
nextSearch = '//a[./img[contains(@src, "comicnext")]]'
starter = bounceStarter
def __init__(self, name, first, last=None):
if name == 'DMFA':
super(DMFA, self).__init__(name)
else:
super(DMFA, self).__init__('DMFA/' + name)
self.firstStripUrl = self.stripUrl % first
if last:
self.url = self.stripUrl % last
self.starter = super(DMFA, self).starter
self.endOfLife = True
@classmethod
def getmodules(cls):
return (
cls('AbelsStory', 'Abel_01', last='Ab_106'),
cls('AprilFools', 'Vol_Fools001', last='Vol_Foolslast'),
cls('Bonus', 'Vol_Bonus001', last='Vol_Bonuslast'),
cls('Christmas', 'HJ_01', last='HJ_06'),
cls('DMFA', 'Vol_001'),
cls('Guest', 'Vol_Guest001', last='Vol_Guestlast'),
cls('Matilda', 'Ma_001', last='Ma_060'),
cls('PerfectDate', 'PD_01', last='PD_18'),
cls('TakePride', 'P_01', last='P_08'),
cls('Valentines', 'Vol_VDay001', last='Vol_VDaylast')
)