From d7925ba4a290975b1145441947bc7189d02a5557 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 6 Mar 2013 20:21:10 +0100 Subject: [PATCH] Sort comics. --- dosagelib/plugins/a.py | 36 +++---- dosagelib/plugins/b.py | 220 ++++++++++++++++++++--------------------- dosagelib/plugins/d.py | 90 ++++++++--------- dosagelib/plugins/e.py | 58 +++++------ dosagelib/plugins/f.py | 60 +++++------ dosagelib/plugins/g.py | 74 +++++++------- dosagelib/plugins/i.py | 16 +-- dosagelib/plugins/k.py | 48 ++++----- dosagelib/plugins/l.py | 36 +++---- dosagelib/plugins/m.py | 1 - dosagelib/plugins/n.py | 62 ++++++------ dosagelib/plugins/o.py | 34 +++---- dosagelib/plugins/p.py | 18 ++-- dosagelib/plugins/r.py | 26 ++--- dosagelib/plugins/s.py | 50 +++++----- dosagelib/plugins/w.py | 44 ++++----- 16 files changed, 436 insertions(+), 437 deletions(-) diff --git a/dosagelib/plugins/a.py b/dosagelib/plugins/a.py index 4b13d96df..3b87dd654 100644 --- a/dosagelib/plugins/a.py +++ b/dosagelib/plugins/a.py @@ -8,24 +8,6 @@ from ..scraper import _BasicScraper from ..helpers import regexNamer, bounceStarter, indirectStarter -class ALessonIsLearned(_BasicScraper): - url = 'http://www.alessonislearned.com/' - prevSearch = compile(tagre("a", "href", r"(index\.php\?comic=\d+)", quote="'")+r"[^>]+previous") - starter = indirectStarter(url, prevSearch) - stripUrl = url + 'index.php?comic=%s' - imageSearch = compile(tagre("img", "src", r"(cmx/lesson\d+\.[a-z]+)")) - help = 'Index format: nnn' - - -class ASofterWorld(_BasicScraper): - url = 'http://www.asofterworld.com/' - stripUrl = url + 'index.php?id=%s' - imageSearch = compile(tagre("p", "id", "thecomic") + r'\s*' + - tagre("img", "src", r'(http://www\.asofterworld\.com/clean/[^"]+)')) - prevSearch = compile(tagre("a", "href", "(index\.php\?id=\d+)")+'< back') - help = 'Index format: n (unpadded)' - - class AbleAndBaker(_BasicScraper): url = 'http://www.jimburgessdesign.com/comics/index.php' stripUrl = url + '?comic=%s' @@ -67,6 +49,15 @@ class AcademyVale(_BasicScraper): help = 'Index format: nnn' +class ALessonIsLearned(_BasicScraper): + url = 'http://www.alessonislearned.com/' + prevSearch = compile(tagre("a", "href", r"(index\.php\?comic=\d+)", quote="'")+r"[^>]+previous") + starter = indirectStarter(url, prevSearch) + stripUrl = url + 'index.php?comic=%s' + imageSearch = compile(tagre("img", "src", r"(cmx/lesson\d+\.[a-z]+)")) + help = 'Index format: nnn' + + class Alice(_BasicScraper): url = 'http://alice.alicecomics.com/' stripUrl = url + '%s/' @@ -152,6 +143,15 @@ class Achewood(_BasicScraper): namer = regexNamer(compile(r'date=(\d+)')) +class ASofterWorld(_BasicScraper): + url = 'http://www.asofterworld.com/' + stripUrl = url + 'index.php?id=%s' + imageSearch = compile(tagre("p", "id", "thecomic") + r'\s*' + + tagre("img", "src", r'(http://www\.asofterworld\.com/clean/[^"]+)')) + prevSearch = compile(tagre("a", "href", "(index\.php\?id=\d+)")+'< back') + help = 'Index format: n (unpadded)' + + class AstronomyPOTD(_BasicScraper): url = 'http://antwrp.gsfc.nasa.gov/apod/astropix.html' starter = bounceStarter(url, diff --git a/dosagelib/plugins/b.py b/dosagelib/plugins/b.py index fd0f2ddef..27182b8fb 100644 --- a/dosagelib/plugins/b.py +++ b/dosagelib/plugins/b.py @@ -9,6 +9,22 @@ from ..scraper import _BasicScraper from ..helpers import indirectStarter +class BackwaterPlanet(_BasicScraper): + url = 'http://www.backwaterplanet.com/current.htm' + stripUrl = 'http://www.backwaterplanet.com/archive/bwp%s.htm' + imageSearch = compile(r'') + prevSearch = compile(r'
')) -class Dilbert(_BasicScraper): - url = 'http://dilbert.com/' - stripUrl = url + '%s/' - prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev")) - imageSearch = compile(tagre("img", "src", r'(/dyn/str_strip/[^"]+\.strip\.zoom\.gif)')) - help = 'Index format: yyyy-mm-dd' - # XXX namer +class Drowtales(_BasicScraper): + url = 'http://www.drowtales.com/mainarchive.php' + stripUrl = url + '?sid=%s' + imageSearch = compile(tagre("img", "src", r'(http://www\.drowtales\.com/mainarchive/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(\?sid=\d+)', before="link_prev_top")) + help = 'Index format: number' # XXX disallowed by robots.txt diff --git a/dosagelib/plugins/e.py b/dosagelib/plugins/e.py index c748d0999..d2f747f07 100644 --- a/dosagelib/plugins/e.py +++ b/dosagelib/plugins/e.py @@ -9,6 +9,19 @@ from ..scraper import _BasicScraper from ..util import tagre +class EarthsongSaga(_BasicScraper): + url = 'http://www.earthsongsaga.com/' + starter = indirectStarter(url, compile(tagre("a", "href", r'([^"]+)') + tagre("img", "src", r'[^"]+current\.jpg'))) + stripUrl = None + imageSearch = compile(tagre("img", "src", r'((?:\.\./)?images/vol\d+/ch\d+/\d+\.\w+)')) + prevSearch = compile(tagre("a", "href", r'([^"]+)', after="Previous")) + + @classmethod + def namer(cls, imageUrl, pageUrl): + imgmatch = compile(r'images/vol(\d+)/ch(\d+)/(\d+)\.\w+$', IGNORECASE).search(imageUrl) + return 'vol%02d_ch%02d_%02d' % (int(imgmatch.group(1)), int(imgmatch.group(2)), int(imgmatch.group(3))) + + class EdibleDirt(_BasicScraper): url = 'http://eddirt.frozenreality.co.uk/' stripUrl = url + 'index.php?id=%s' @@ -60,6 +73,14 @@ class ElGoonishShiveNP(_BasicScraper): help = 'Index format: yyyy-mm-dd' +class Ellerbisms(_BasicScraper): + url = 'http://www.ellerbisms.com/' + stripUrl = url + '?p=%s' + imageSearch = compile(tagre("img", "src", r'(http://www\.ellerbisms\.com/comics/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(http://www\.ellerbisms\.com/[^"]+)', after="prev")) + help = 'Index format: nnn' + + class EmergencyExit(_BasicScraper): url = 'http://www.eecomics.net/' stripUrl = url + "?strip_id=%s" @@ -124,6 +145,14 @@ class ExiernDarkReflections(_BasicScraper): help = 'Index format: n' +class ExploitationNow(_BasicScraper): + url = 'http://www.exploitationnow.com/' + stripUrl = url + '%s' + imageSearch = compile(tagre("img", "src", r'(http://www\.exploitationnow\.com/comics/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(http://www\.exploitationnow\.com/[^"]+)', after="navi-prev")) + help = 'Index format: yyyy-mm-dd/num' + + class ExtraLife(_BasicScraper): url = 'http://www.myextralife.com/' stripUrl = url + 'comic/%s/' @@ -138,32 +167,3 @@ class EyeOfRamalach(_BasicScraper): imageSearch = compile(tagre("img", "src", r'(http://theeye\.katbox\.net/wp-content/uploads/[^"]+final[^"]+)')) prevSearch = compile(tagre("a", "href", r'(http://theeye\.katbox\.net/comic/[^"]+)', after="previous")) help = 'Index format: stripname' - - -class EarthsongSaga(_BasicScraper): - url = 'http://www.earthsongsaga.com/' - starter = indirectStarter(url, compile(tagre("a", "href", r'([^"]+)') + tagre("img", "src", r'[^"]+current\.jpg'))) - stripUrl = None - imageSearch = compile(tagre("img", "src", r'((?:\.\./)?images/vol\d+/ch\d+/\d+\.\w+)')) - prevSearch = compile(tagre("a", "href", r'([^"]+)', after="Previous")) - - @classmethod - def namer(cls, imageUrl, pageUrl): - imgmatch = compile(r'images/vol(\d+)/ch(\d+)/(\d+)\.\w+$', IGNORECASE).search(imageUrl) - return 'vol%02d_ch%02d_%02d' % (int(imgmatch.group(1)), int(imgmatch.group(2)), int(imgmatch.group(3))) - - -class ExploitationNow(_BasicScraper): - url = 'http://www.exploitationnow.com/' - stripUrl = url + '%s' - imageSearch = compile(tagre("img", "src", r'(http://www\.exploitationnow\.com/comics/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(http://www\.exploitationnow\.com/[^"]+)', after="navi-prev")) - help = 'Index format: yyyy-mm-dd/num' - - -class Ellerbisms(_BasicScraper): - url = 'http://www.ellerbisms.com/' - stripUrl = url + '?p=%s' - imageSearch = compile(tagre("img", "src", r'(http://www\.ellerbisms\.com/comics/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(http://www\.ellerbisms\.com/[^"]+)', after="prev")) - help = 'Index format: nnn' diff --git a/dosagelib/plugins/f.py b/dosagelib/plugins/f.py index 91a4f5f4f..0abbc25ea 100644 --- a/dosagelib/plugins/f.py +++ b/dosagelib/plugins/f.py @@ -17,6 +17,36 @@ class FalconTwin(_BasicScraper): help = 'Index format: nnn' +class Fallen(_BasicScraper): + url = 'http://www.fallencomic.com/fal-page.htm' + stripUrl = 'http://www.fallencomic.com/pages/part%s/%s-p%s.htm' + imageSearch = compile(r'Back', IGNORECASE) + help = 'Index format: nn-m (comicNumber-partNumber)' + starter = indirectStarter(url, + compile(r'\(NEW \d{2}/\d{2}/\d{2}\)\s*\n*\s*\d+', MULTILINE)) + + @classmethod + def namer(cls, imageUrl, pageUrl): + num = pageUrl.split('/')[-1].split('-')[0] + part = pageUrl.split('-')[-1].split('.')[0] + return '%s-%s' % (part, num) + + def getIndexStripUrl(self, index): + index, part = index.split('-') + return self.stripUrl % (part, index, part) + + +class FantasyRealms(_BasicScraper): + url = 'http://www.fantasyrealmsonline.com/' + stripUrl = url + 'manga/%s.php' + imageSearch = compile(r'Back', IGNORECASE) - help = 'Index format: nn-m (comicNumber-partNumber)' - starter = indirectStarter(url, - compile(r'\(NEW \d{2}/\d{2}/\d{2}\)\s*\n*\s*\d+', MULTILINE)) - - @classmethod - def namer(cls, imageUrl, pageUrl): - num = pageUrl.split('/')[-1].split('-')[0] - part = pageUrl.split('-')[-1].split('.')[0] - return '%s-%s' % (part, num) - - def getIndexStripUrl(self, index): - index, part = index.split('-') - return self.stripUrl % (part, index, part) - - class FredoAndPidjin(_BasicScraper): url = 'http://www.pidjin.net/' stripUrl = None diff --git a/dosagelib/plugins/g.py b/dosagelib/plugins/g.py index 165c10d89..76a790160 100644 --- a/dosagelib/plugins/g.py +++ b/dosagelib/plugins/g.py @@ -27,13 +27,20 @@ class Garanos(_BasicScraper): help = 'Index format: n (unpadded)' -class GUComics(_BasicScraper): - url = 'http://www.gucomics.com/comic/' - stripUrl = url + '?cdate=%s' - imageSearch = compile(tagre("img", "src", r'(/comics/\d{4}/gu_[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(/comic/\?cdate=\d+)') + - tagre("img", "src", r'/images/nav/prev\.png')) - help = 'Index format: yyyymmdd' +class GastroPhobia(_BasicScraper): + url = 'http://www.gastrophobia.com/' + stripUrl = url + 'index.php?date=%s' + imageSearch = compile(r']*>(?!
)') + prevSearch = compile(r'« Previous') + help = 'Index format: nnn' class GirlGenius(_BasicScraper): @@ -52,6 +59,14 @@ class GirlsWithSlingshots(_BasicScraper): help = 'Index format: nnn' +class GlassHalfEmpty(_BasicScraper): + url = 'http://www.defectivity.com/ghe/index.php' + stripUrl = url + '?strip_id=%s' + imageSearch = compile(r'src="(comics/.+?)"') + prevSearch = compile(tagre("a", "href", r'(\?strip_id=\d+)') + tagre("img", "src", r'\.\./images/arrowbuttons/onback\.jpg')) + help = 'Index format: nnn' + + class GleefulNihilism(_BasicScraper): url = 'http://gleefulnihilism.com/' stripUrl = url + 'comics/%s/' @@ -82,6 +97,14 @@ class GoneWithTheBlastwave(_BasicScraper): return '%02d' % int(compile(r'nro=(\d+)').search(pageUrl).group(1)) +class GreystoneInn(_BasicScraper): + url = 'http://www.greystoneinn.net/' + stripUrl = url + 'd/%s.html' + imageSearch=compile(tagre("img", "src", r'(/comic[s|/][^"]+)')) + prevSearch=compile(tagre("a", "href", r'[^"]*(/d/\d+\.s?html)')+r"[^>]+/images/(?:nav_02|previous_day)\.gif") + help='Index format: yyyymmdd' + + class GrrlPower(_BasicScraper): url = 'http://www.grrlpowercomic.com/' stripUrl = url + 'archives/%s' @@ -107,33 +130,10 @@ class Gunshow(_BasicScraper): help = 'Index format: n' -class GastroPhobia(_BasicScraper): - url = 'http://www.gastrophobia.com/' - stripUrl = url + 'index.php?date=%s' - imageSearch = compile(r']*>(?!
)') - prevSearch = compile(r'
« Previous') - help = 'Index format: nnn' - - -class GlassHalfEmpty(_BasicScraper): - url = 'http://www.defectivity.com/ghe/index.php' - stripUrl = url + '?strip_id=%s' - imageSearch = compile(r'src="(comics/.+?)"') - prevSearch = compile(tagre("a", "href", r'(\?strip_id=\d+)') + tagre("img", "src", r'\.\./images/arrowbuttons/onback\.jpg')) - help = 'Index format: nnn' - - -class GreystoneInn(_BasicScraper): - url = 'http://www.greystoneinn.net/' - stripUrl = url + 'd/%s.html' - imageSearch=compile(tagre("img", "src", r'(/comic[s|/][^"]+)')) - prevSearch=compile(tagre("a", "href", r'[^"]*(/d/\d+\.s?html)')+r"[^>]+/images/(?:nav_02|previous_day)\.gif") - help='Index format: yyyymmdd' +class GUComics(_BasicScraper): + url = 'http://www.gucomics.com/comic/' + stripUrl = url + '?cdate=%s' + imageSearch = compile(tagre("img", "src", r'(/comics/\d{4}/gu_[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(/comic/\?cdate=\d+)') + + tagre("img", "src", r'/images/nav/prev\.png')) + help = 'Index format: yyyymmdd' diff --git a/dosagelib/plugins/i.py b/dosagelib/plugins/i.py index d1fd004b7..2c849fe2c 100644 --- a/dosagelib/plugins/i.py +++ b/dosagelib/plugins/i.py @@ -32,14 +32,6 @@ class IDreamOfAJeanieBottle(_BasicScraper): help = 'Index format: n (unpadded)' -class IrregularWebcomic(_BasicScraper): - url = 'http://www.irregularwebcomic.net/' - stripUrl = url + '%s.html' - imageSearch = compile(r'') - prevSearch = compile(r'Previous ') - help = 'Index format: nnn' - - class InsideOut(_BasicScraper): url = 'http://www.insideoutcomic.com/' stripUrl = url + 'html/%s.html' @@ -48,6 +40,14 @@ class InsideOut(_BasicScraper): help = 'Index format: n_comic_name' +class IrregularWebcomic(_BasicScraper): + url = 'http://www.irregularwebcomic.net/' + stripUrl = url + '%s.html' + imageSearch = compile(r'') + prevSearch = compile(r'Previous ') + help = 'Index format: nnn' + + class ItsWalky(_BasicScraper): url = 'http://www.itswalky.com/' stripUrl = url + 'd/%s.html' diff --git a/dosagelib/plugins/k.py b/dosagelib/plugins/k.py index 528aaaa2d..e235e46e3 100644 --- a/dosagelib/plugins/k.py +++ b/dosagelib/plugins/k.py @@ -6,30 +6,6 @@ from re import compile, IGNORECASE from ..scraper import _BasicScraper from ..util import tagre -class Key(_BasicScraper): - url = 'http://key.shadilyn.com/latestpage.html' - stripUrl = 'http://key.shadilyn.com/pages/%s.html' - imageSearch = compile(r'"((?:images/.+?)|(?:pages/images/.+?))"') - prevSearch = compile(r'') + help = 'Index format: nnn' class NekoTheKitty(_BasicScraper): @@ -115,6 +98,15 @@ class NichtLustig(_BasicScraper): compile(tagre("a", "href", r'([^"]*toondb/\d+\.html)'))) +class Nnewts(_BasicScraper): + url = 'http://nnewts.com/' + stripUrl = url + '%s/' + firstStripUrl = stripUrl % 'nnewts-page-1' + imageSearch = compile(tagre("img", "src", r'(http://nnewts\.com/newty/comics/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(http://nnewts\.com/(?:nnewts-)?page-\d+/)', after="navi-prev")) + help = 'Index format: page-number' + + class Nodwick(_BasicScraper): url = 'http://comic.nodwick.com/' stripUrl = url + "?p=%s" @@ -123,14 +115,6 @@ class Nodwick(_BasicScraper): help = 'Index format: stripnumber' -class NekkoAndJoruba(_BasicScraper): - url = 'http://www.nekkoandjoruba.com/' - stripUrl = url + '?p=%s' - imageSearch = compile(r'‹') - help = 'Index format: nnn' - - class NobodyScores(_BasicScraper): url = 'http://nobodyscores.loosenutstudio.com/' stripUrl = url + 'index.php?id=%s' @@ -138,3 +122,19 @@ class NobodyScores(_BasicScraper): multipleImagesPerStrip = True prevSearch = compile(r'the one before ') help = 'Index format: nnn' + + +class NoNeedForBushido(_BasicScraper): + url = 'http://noneedforbushido.com/latest/' + stripUrl = 'http://noneedforbushido.com/%s/' + imageSearch = compile(tagre("img", "src", r'(http://noneedforbushido\.com/comics/comic/[^"]+)')) + prevSearch = compile(tagre("a", "href", r'(http://noneedforbushido\.com/[^"]+)', after="previous-comic-link")) + help = 'Index format: yyyy/comic/nnn' + + +class Nukees(_BasicScraper): + url = 'http://www.nukees.com/' + stripUrl = url + 'd/%s' + imageSearch = compile(r'"comic".+?"(/comics/.+?)"') + prevSearch = compile(r'"(/d/.+?)".+?previous') + help = 'Index format: yyyymmdd.html' diff --git a/dosagelib/plugins/o.py b/dosagelib/plugins/o.py index 96c44e21a..23b87beb6 100644 --- a/dosagelib/plugins/o.py +++ b/dosagelib/plugins/o.py @@ -27,6 +27,23 @@ class OddFish(_BasicScraper): help = 'Index format: stripname' +class Oglaf(_BasicScraper): + url = 'http://oglaf.com/' + stripUrl = url + '%s/' + imageSearch = compile(tagre("img", "src", r'(/media/comic/[^"]+)', before="strip")) + prevSearch = compile(tagre("a", "href", r'([^"]+)') + tagre("div", "id", "pvs")) + help = 'Index format: stripname/nn' + + +class OkCancel(_BasicScraper): + url = 'http://okcancel.com/' + stripUrl = url + 'comic/%s.html' + imageSearch = compile(tagre("img", "src", r'(http://okcancel\.com/strips/okcancel\d{8}\.gif)')) + prevSearch = compile(tagre("div", "class", "previous") + tagre("a", "href", r'(http://okcancel\.com/comic/\d{1,4}\.html)')) + starter = indirectStarter(url, prevSearch) + help = 'Index format: yyyymmdd' + + class OmakeTheater(_BasicScraper): url = 'http://omaketheater.com/' stripUrl = url + 'comic/%s' @@ -61,23 +78,6 @@ class OurHomePlanet(_BasicScraper): help = 'Index format: n (unpadded)' -class OkCancel(_BasicScraper): - url = 'http://okcancel.com/' - stripUrl = url + 'comic/%s.html' - imageSearch = compile(tagre("img", "src", r'(http://okcancel\.com/strips/okcancel\d{8}\.gif)')) - prevSearch = compile(tagre("div", "class", "previous") + tagre("a", "href", r'(http://okcancel\.com/comic/\d{1,4}\.html)')) - starter = indirectStarter(url, prevSearch) - help = 'Index format: yyyymmdd' - - -class Oglaf(_BasicScraper): - url = 'http://oglaf.com/' - stripUrl = url + '%s/' - imageSearch = compile(tagre("img", "src", r'(/media/comic/[^"]+)', before="strip")) - prevSearch = compile(tagre("a", "href", r'([^"]+)') + tagre("div", "id", "pvs")) - help = 'Index format: stripname/nn' - - class OverCompensating(_BasicScraper): url = 'http://www.overcompensating.com/' stripUrl = url + 'posts/%s.html' diff --git a/dosagelib/plugins/p.py b/dosagelib/plugins/p.py index 77f776d72..8e0d816e4 100644 --- a/dosagelib/plugins/p.py +++ b/dosagelib/plugins/p.py @@ -128,6 +128,15 @@ class Pimpette(_BasicScraper): help = 'Index format: yyyymmdd' +# Broken navigation: prev link at http://planescapecomic.com/201.html points to same URL. +class _PlanescapeSurvival(_BasicScraper): + url = 'http://planescapecomic.com/' + stripUrl = url + '%s.html' + imageSearch = compile(r'src="(comics/.+?)"') + prevSearch = compile(r'Previous]+?>]+?src="/previouscomic.gif">') help = 'Index format: yyyymmdd' - - -# Broken navigation: prev link at http://planescapecomic.com/201.html points to same URL. -class _PlanescapeSurvival(_BasicScraper): - url = 'http://planescapecomic.com/' - stripUrl = url + '%s.html' - imageSearch = compile(r'src="(comics/.+?)"') - prevSearch = compile(r'Previousnext')) + stripUrl = 'http://www.redmeat.com/redmeat/%s/index.html' + imageSearch = compile(r']*>') + prevSearch = compile(r'previous') + help = 'Index format: yyyy-mm-dd' + + @classmethod + def namer(cls, imageUrl, pageUrl): + return imageUrl.split('/')[-2] + + class RedString(_BasicScraper): url = 'http://www.redstring.strawberrycomics.com/' stripUrl = url + 'index.php?id=%s' @@ -38,16 +51,3 @@ class Roza(_BasicScraper): imageSearch = compile(r'[^>].+?navtable_01.gif') help = 'Index format: yyyy-mm-dd' - - -class RedMeat(_BasicScraper): - url = 'http://www.redmeat.com/redmeat/current/index.html' - starter = bounceStarter(url, compile(r'next')) - stripUrl = 'http://www.redmeat.com/redmeat/%s/index.html' - imageSearch = compile(r']*>') - prevSearch = compile(r'previous') - help = 'Index format: yyyy-mm-dd' - - @classmethod - def namer(cls, imageUrl, pageUrl): - return imageUrl.split('/')[-2] diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py index febffa32e..96276ffa2 100644 --- a/dosagelib/plugins/s.py +++ b/dosagelib/plugins/s.py @@ -83,6 +83,23 @@ class SequentialArt(_BasicScraper): help = 'Index format: name' +class SexyLosers(_BasicScraper): + adult = True + url = 'http://www.sexylosers.com/' + stripUrl = url + '%s.html' + imageSearch = compile(r'<<', IGNORECASE) + help = 'Index format: nnn' + starter = indirectStarter(url, + compile(r'SEXY LOSERS Latest SL Comic \(#\d+\)', IGNORECASE)) + + @classmethod + def namer(cls, imageUrl, pageUrl): + index = pageUrl.split('/')[-1].split('.')[0] + title = imageUrl.split('/')[-1].split('.')[0] + return index + '-' + title + + class ShadowGirls(_BasicScraper): url = 'http://www.shadowgirlscomic.com/' stripUrl = url + 'comics/%s' @@ -150,6 +167,14 @@ class SluggyFreelance(_BasicScraper): help = 'Index format: yymmdd' +class SMBC(_BasicScraper): + url = 'http://www.smbc-comics.com/' + stripUrl = url + 'index.php?db=comics&id=%s' + imageSearch = compile(r'') + prevSearch = compile(r'131,13,216,84"\n\s+href="(.+?)#comic"\n>', MULTILINE) + help = 'Index format: nnnn' + + class SnowFlame(_BasicScraper): url = 'http://www.snowflamecomic.com/' stripUrl = url + '?comic=snowflame-%s-%s' @@ -275,23 +300,6 @@ class SomethingPositive(_BasicScraper): help = 'Index format: mmddyyyy' -class SexyLosers(_BasicScraper): - adult = True - url = 'http://www.sexylosers.com/' - stripUrl = url + '%s.html' - imageSearch = compile(r'<<', IGNORECASE) - help = 'Index format: nnn' - starter = indirectStarter(url, - compile(r'SEXY LOSERS Latest SL Comic \(#\d+\)', IGNORECASE)) - - @classmethod - def namer(cls, imageUrl, pageUrl): - index = pageUrl.split('/')[-1].split('.')[0] - title = imageUrl.split('/')[-1].split('.')[0] - return index + '-' + title - - class StarCrossdDestiny(_BasicScraper): url = 'http://www.starcrossd.net/comic.html' stripUrl = 'http://www.starcrossd.net/archives/%s.html' @@ -329,14 +337,6 @@ class _StrangeCandy(_BasicScraper): help = 'Index format: yyyyddmm' -class SMBC(_BasicScraper): - url = 'http://www.smbc-comics.com/' - stripUrl = url + 'index.php?db=comics&id=%s' - imageSearch = compile(r'') - prevSearch = compile(r'131,13,216,84"\n\s+href="(.+?)#comic"\n>', MULTILINE) - help = 'Index format: nnnn' - - class SupernormalStep(_BasicScraper): url = 'http://supernormalstep.com/' stripUrl = url + '?p=%s' diff --git a/dosagelib/plugins/w.py b/dosagelib/plugins/w.py index 633b00f36..a25c0ffd1 100644 --- a/dosagelib/plugins/w.py +++ b/dosagelib/plugins/w.py @@ -8,12 +8,12 @@ from ..scraper import _BasicScraper from ..util import tagre -class WayfarersMoon(_BasicScraper): - url = 'http://www.wayfarersmoon.com/' - stripUrl = url + 'index.php?page=%s' - imageSearch = compile(r']+?>Previous') + help = 'Index format: strip-name' class WastedTalent(_BasicScraper): @@ -24,6 +24,22 @@ class WastedTalent(_BasicScraper): help = 'Index format: stripname' +class WayfarersMoon(_BasicScraper): + url = 'http://www.wayfarersmoon.com/' + stripUrl = url + 'index.php?page=%s' + imageSearch = compile(r']+?>Previous') - help = 'Index format: strip-name' - - -class WeCanSleepTomorrow(_BasicScraper): - url = 'http://wecansleeptomorrow.com/' - stripUrl = url + '%s/' - imageSearch = compile(tagre("img", "src", r'(http://wecansleeptomorrow\.com/comics/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(http://wecansleeptomorrow\.com/[^"]+)', after="prev")) - help = 'Index format: yyyy/mm/dd/stripname' - - class Wondermark(_BasicScraper): url = 'http://wondermark.com/' stripUrl = url + '%s/'