2012-06-20 20:41:04 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2012-11-21 20:57:26 +00:00
|
|
|
# Copyright (C) 2012 Bastian Kleineidam
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
from re import compile, MULTILINE, IGNORECASE, sub
|
|
|
|
from os.path import splitext
|
2012-10-11 10:03:12 +00:00
|
|
|
from ..scraper import _BasicScraper
|
2012-11-21 20:57:26 +00:00
|
|
|
from ..helpers import indirectStarter
|
2012-11-20 17:53:53 +00:00
|
|
|
from ..util import tagre
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SailorsunOrg(_BasicScraper):
|
2012-12-04 06:02:40 +00:00
|
|
|
latestUrl = 'http://sailorsun.org/'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + '?p=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://sailorsun\.org/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://sailorsun\.org/\?p=\d+)', after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
|
|
|
class SamAndFuzzy(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.samandfuzzy.com/'
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = 'http://samandfuzzy.com/%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'(/comics/.+?)" alt')
|
|
|
|
prevSearch = compile(r'"><a href="(.+?)"><img src="imgint/nav_prev.gif"')
|
|
|
|
help = 'Index format: nnnn'
|
|
|
|
|
|
|
|
|
|
|
|
class SarahZero(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.sarahzero.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'sz_%s.html'
|
2012-12-04 06:02:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(z_(?:spreads|decoy)/sz_[^"]+)'))
|
2012-11-21 20:57:26 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(sz_\d+\.html)') + tagre("img", "src", r'z_site/sz_05_nav\.gif'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: nnnn'
|
|
|
|
|
|
|
|
|
|
|
|
class ScaryGoRound(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.scarygoround.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?date=%s'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(strips/\d+\.png)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(\?date=\d+)') + "Previous")
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
2012-11-20 17:53:53 +00:00
|
|
|
class SchlockMercenary(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.schlockmercenary.com/'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + '%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://static\.schlockmercenary\.com/comics/[^"]+)'))
|
2012-12-04 06:02:40 +00:00
|
|
|
multipleImagesPerStrip = True
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+)', quote="'", after="nav-previous"))
|
2012-11-21 20:57:26 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
2012-11-20 17:53:53 +00:00
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
class SchoolBites(_BasicScraper):
|
2012-11-21 20:57:26 +00:00
|
|
|
latestUrl = 'http://schoolbites.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'd/%s.html'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://cdn\.schoolbites\.net/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://schoolbites\.net/d/\d+\.html)', after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2012-11-20 17:53:53 +00:00
|
|
|
class Sheldon(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.sheldoncomics.com/'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + 'archive/%s.html'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(/strips/[^"]+)'))
|
2012-11-26 17:44:31 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(/archive/\d+\.html)', after="sidenav-prev"))
|
2012-11-21 20:57:26 +00:00
|
|
|
help = 'Index format: yymmdd'
|
2012-11-20 17:53:53 +00:00
|
|
|
|
|
|
|
|
2012-12-08 20:30:51 +00:00
|
|
|
class Shivae(_BasicScraper):
|
|
|
|
latestUrl = 'http://shivae.net/'
|
|
|
|
stripUrl = latestUrl + 'blog/%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://shivae\.net/files/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://shivae\.net/blog/[^"]+)', after="Previous"))
|
|
|
|
help = 'Index format: yyyy/mm/dd/stripname'
|
|
|
|
|
|
|
|
|
2012-12-12 16:41:29 +00:00
|
|
|
# XXX disallowed by robots.txt
|
|
|
|
class _Shortpacked(_BasicScraper):
|
2012-11-20 17:53:53 +00:00
|
|
|
latestUrl = 'http://www.shortpacked.com/'
|
2012-12-02 17:35:06 +00:00
|
|
|
stripUrl = latestUrl + '%s/'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.shortpacked\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.shortpacked\.com/\d+/comic/[^"]+)', after="prev"))
|
2012-12-02 17:35:06 +00:00
|
|
|
help = 'Index format: yyyy/comic/book-nn/mm-name1/name2'
|
2012-11-20 17:53:53 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class SinFest(_BasicScraper):
|
|
|
|
name = 'KeenSpot/SinFest'
|
|
|
|
latestUrl = 'http://www.sinfest.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'archive_page.php?comicID=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src=".+?(/comikaze/comics/.+?)"')
|
|
|
|
prevSearch = compile(r'(/archive_page.php\?comicID=.+?)".+?prev_a')
|
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
|
|
|
class SlightlyDamned(_BasicScraper):
|
2012-11-21 20:57:26 +00:00
|
|
|
latestUrl = 'http://www.sdamned.com/'
|
|
|
|
stripUrl = latestUrl + '%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.sdamned\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.sdamned\.com/[^"]+)', after="prev"))
|
|
|
|
help = 'Index format: yyyy/mm/number'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SluggyFreelance(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.sluggy.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'comics/archives/daily/%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src="(/images/comics/.+?)"')
|
|
|
|
prevSearch = compile(r'<a href="(.+?)"[^>]+?><span class="ui-icon ui-icon-seek-prev">')
|
|
|
|
help = 'Index format: yymmdd'
|
|
|
|
|
|
|
|
|
|
|
|
class SodiumEyes(_BasicScraper):
|
2012-11-21 20:57:26 +00:00
|
|
|
latestUrl = 'http://sodiumeyes.com/'
|
|
|
|
stripUrl = latestUrl + '%s/'
|
2012-12-04 06:02:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://sodiumeyes\.com/comic/[^ ]+)', quote=""))
|
2012-11-21 20:57:26 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://sodiumeyes\.com/[^"]+)', after="prev"))
|
|
|
|
help = 'Index format: yyyy/mm/dd/stripname'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2012-12-08 20:30:51 +00:00
|
|
|
class Sorcery101(_BasicScraper):
|
|
|
|
baseUrl = 'http://www.sorcery101.net/'
|
|
|
|
latestUrl = baseUrl + 'sorcery-101/'
|
|
|
|
stripUrl = baseUrl + 'sorcery101/%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.sorcery101\.net/comics/sorcery101/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.sorcery101\.net/sorcery101/[^"]+)', after="previous-comic-link"))
|
|
|
|
help = 'Index format: stripname'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class SpareParts(_BasicScraper):
|
2012-11-21 20:57:26 +00:00
|
|
|
baseUrl = 'http://www.sparepartscomics.com/'
|
|
|
|
latestUrl = baseUrl + 'comics/?date=20080328'
|
2012-12-04 06:02:40 +00:00
|
|
|
stripUrl = baseUrl + 'comics/index.php?date=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.sparepartscomics\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(index\.php\?date=\d+)', quote="'") + "Previous Comic")
|
2012-11-20 17:53:53 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2012-12-08 20:30:51 +00:00
|
|
|
class SPQRBlues(_BasicScraper):
|
|
|
|
latestUrl = 'http://spqrblues.com/IV/'
|
|
|
|
stripUrl = latestUrl + '?p=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://spqrblues\.com/IV/comics/\d+\.png)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://spqrblues\.com/IV/\?p=\d+)', after="prev"))
|
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2012-12-13 20:05:27 +00:00
|
|
|
# XXX disallowed by robots.txt
|
|
|
|
class _StationV3(_BasicScraper):
|
2012-12-08 20:30:51 +00:00
|
|
|
latestUrl = 'http://www.stationv3.com/'
|
|
|
|
stripUrl = latestUrl + 'd/%s.html'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.stationv3\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.stationv3\.com/d/\d+\.html)') +
|
|
|
|
tagre("img", "src", r'http://www\.stationv3\.com/images/previous\.gif'))
|
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class Stubble(_BasicScraper):
|
2012-11-21 20:57:26 +00:00
|
|
|
latestUrl = 'http://stubblecomics.com/'
|
|
|
|
stripUrl = latestUrl + '?p=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://stubblecomics\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://stubblecomics\.com/\?p=\d+)', after="navi-prev"))
|
|
|
|
help = 'Index format: number'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class StrawberryDeathCake(_BasicScraper):
|
2012-11-21 20:57:26 +00:00
|
|
|
latestUrl = 'http://strawberrydeathcake.com/'
|
|
|
|
stripUrl = latestUrl + 'archive/%s/'
|
2012-12-04 06:02:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://strawberrydeathcake\.com/wp-content/webcomic/[^"]+)'))
|
2012-11-21 20:57:26 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://strawberrydeathcake\.com/archive/[^"]+)', after="previous"))
|
|
|
|
help = 'Index format: stripname'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SuburbanTribe(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.pixelwhip.com/'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + '?p=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.pixelwhip\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.pixelwhip\.com/\?p=\d+)', after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: nnnn'
|
|
|
|
|
|
|
|
|
|
|
|
class SomethingPositive(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.somethingpositive.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'sp%s.shtml'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(sp\d+\.png)'))
|
2012-12-12 16:41:29 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(sp\d+\.shtml)') +
|
2012-12-04 06:02:40 +00:00
|
|
|
"(?:" + tagre("img", "src", r'images/previous\.gif') + "|Previous)")
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: mmddyyyy'
|
|
|
|
|
|
|
|
|
|
|
|
class SexyLosers(_BasicScraper):
|
2012-12-09 19:15:22 +00:00
|
|
|
adult = True
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = 'http://www.sexylosers.com/%s.html'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src\s*=\s*"\s*(comics/[\w\.]+?)"', IGNORECASE)
|
|
|
|
prevSearch = compile(r'<a href="(/\d{3}\.\w+?)"><font color = FFAAAA><<', IGNORECASE)
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
starter = indirectStarter('http://www.sexylosers.com/',
|
|
|
|
compile(r'SEXY LOSERS <A HREF="(.+?)">Latest SL Comic \(#\d+\)</A>', 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):
|
|
|
|
latestUrl = 'http://www.starcrossd.net/comic.html'
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = 'http://www.starcrossd.net/archives/%s.html'
|
2012-12-04 06:02:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.starcrossd\.net/(?:ch1|strips|book2)/[^"]+)'))
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r'<a href="(http://www\.starcrossd\.net/(?:ch1/)?archives/\d+\.html)"[^>]*"[^"]*"[^>]*>prev', IGNORECASE)
|
|
|
|
help = 'Index format: nnnnnnnn'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
if imageUrl.find('ch1') == -1:
|
|
|
|
# At first all images were stored in a strips/ directory but that was changed with the introduction of book2
|
|
|
|
imageUrl = sub('(?:strips)|(?:images)','book1',imageUrl)
|
|
|
|
elif not imageUrl.find('strips') == -1:
|
|
|
|
imageUrl = imageUrl.replace('strips/','')
|
|
|
|
directory, filename = imageUrl.split('/')[-2:]
|
|
|
|
filename, extension = splitext(filename)
|
|
|
|
return directory + '-' + filename
|
|
|
|
|
|
|
|
|
|
|
|
class Spamusement(_BasicScraper):
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = 'http://spamusement.com/index.php/comics/view/%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src="(http://spamusement.com/gfx/\d+\..+?)"', IGNORECASE)
|
|
|
|
prevSearch = compile(r'<a href="(http://spamusement.com/index.php/comics/view/.+?)">', IGNORECASE)
|
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
starter = indirectStarter('http://spamusement.com/', prevSearch)
|
|
|
|
|
|
|
|
|
2012-12-13 20:05:27 +00:00
|
|
|
# XXX disallowed by robots.txt
|
|
|
|
class _StrangeCandy(_BasicScraper):
|
2012-06-20 19:58:13 +00:00
|
|
|
latestUrl = 'http://www.strangecandy.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'd/%s.html'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/comics/\d+\.jpg)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(/d/\d+\.html)') + tagre("img", "alt", "Previous comic"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyyddmm'
|
|
|
|
|
|
|
|
|
|
|
|
class SMBC(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.smbc-comics.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'index.php?db=comics&id=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src=\'(.+?\d{8}.\w{1,4})\'>')
|
|
|
|
prevSearch = compile(r'131,13,216,84"\n\s+href="(.+?)#comic"\n>', MULTILINE)
|
|
|
|
help = 'Index format: nnnn'
|