'))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl) + tagre("img", "src", r"%sm_prev\.png" % rurl))
+ starter = indirectStarter(url, compile(tagre("div", "id", "preview") +
+ tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+)' % rurl)))
class DrMcNinja(_BasicScraper):
url = 'http://drmcninja.com/'
+ rurl = escape(url)
stripUrl = url + 'archives/comic/%s/'
firstStripUrl = stripUrl % '0p1'
- imageSearch = compile(tagre("img", "src", r'(http://drmcninja\.com/comics/\d+-\d+-\d+[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://drmcninja\.com/archives/comic/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%sarchives/comic/[^"]+)' % rurl, after="prev"))
help = 'Index format: episode number and page'
@@ -243,7 +252,8 @@ class Drowtales(_BasicScraper):
# XXX disallowed by robots.txt
class _DumbingOfAge(_BasicScraper):
url = 'http://www.dumbingofage.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- prevSearch = compile(tagre("a", "href", r'(http://www\.dumbingofage\.com/\d+/[^"]+)', after="prev"))
- imageSearch = compile(tagre("img", "src", r'(http://www\.dumbingofage\.com/comics/\d+-\d+-\d+[^"]+)'))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/[^"]+)' % rurl, after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
help = 'Index format: yyyy/comic/book-num/seriesname/stripname'
diff --git a/dosagelib/plugins/e.py b/dosagelib/plugins/e.py
index 9093bf0b1..273a028ed 100644
--- a/dosagelib/plugins/e.py
+++ b/dosagelib/plugins/e.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile, IGNORECASE
+from re import compile, escape, IGNORECASE
from ..helpers import indirectStarter
from ..scraper import _BasicScraper
@@ -76,9 +76,10 @@ class ElGoonishShiveNP(_BasicScraper):
class Ellerbisms(_BasicScraper):
url = 'http://www.ellerbisms.com/'
+ rurl = escape(url)
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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: nnn'
@@ -132,17 +133,19 @@ class EvilInc(_BasicScraper):
class Exiern(_BasicScraper):
url = 'http://www.exiern.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.exiern\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.exiern\.com/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class ExploitationNow(_BasicScraper):
url = 'http://www.exploitationnow.com/'
+ rurl = escape(url)
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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="navi-prev"))
help = 'Index format: yyyy-mm-dd/num'
@@ -156,16 +159,18 @@ class ExtraLife(_BasicScraper):
class ExtraOrdinary(_BasicScraper):
url = 'http://exocomics.com/'
+ rurl = escape(url)
stripUrl = url + '%s'
firstStripUrl = stripUrl % '01'
- prevSearch = compile(tagre("a", "href", r'(http://www\.exocomics\.com/\d+)', before="prev"))
- imageSearch = compile(tagre("img", "src", r'(http://www\.exocomics\.com/comics/comics/\d+\.[^"]+)'))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+)' % rurl, before="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/comics/\d+\.[^"]+)' % rurl))
help = 'Index format: number'
class EyeOfRamalach(_BasicScraper):
url = 'http://theeye.katbox.net/'
+ rurl = escape(url)
stripUrl = url + 'comic/%s/'
- imageSearch = compile(tagre("img", "src", r'(http://theeye\.katbox\.net/wp-content/uploads/[^"]+)', after="data-webcomic-parent"))
- prevSearch = compile(tagre("a", "href", r'(http://theeye\.katbox\.net/comic/[^"]+)', after="previous"))
+ imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/[^"]+)' % rurl, after="data-webcomic-parent"))
+ prevSearch = compile(tagre("a", "href", r'(%scomic/[^"]+)' % rurl, after="previous"))
help = 'Index format: stripname'
diff --git a/dosagelib/plugins/f.py b/dosagelib/plugins/f.py
index d8840f492..f6a981e4b 100644
--- a/dosagelib/plugins/f.py
+++ b/dosagelib/plugins/f.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile, IGNORECASE, MULTILINE
+from re import compile, escape, IGNORECASE, MULTILINE
from ..util import tagre
from ..scraper import _BasicScraper
@@ -18,13 +18,14 @@ class FalconTwin(_BasicScraper):
class Fallen(_BasicScraper):
- url = 'http://www.fallencomic.com/fal-page.htm'
- stripUrl = 'http://www.fallencomic.com/pages/part%s/%s-p%s.htm'
+ baseurl = 'http://www.fallencomic.com/'
+ url = baseurl + 'fal-page.htm'
+ stripUrl = baseurl + '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))
+ compile(r'\(NEW \d{2}/\d{2}/\d{2}\)\s*\n*\s*\d+', MULTILINE))
@classmethod
def namer(cls, imageUrl, pageUrl):
@@ -44,7 +45,7 @@ class FantasyRealms(_BasicScraper):
prevSearch = compile(r'')
help = 'Index format: yyyy/mm/dd/num-name'
@@ -45,18 +48,20 @@ class LittleGamers(_BasicScraper):
class LoadingArtist(_BasicScraper):
url = 'http://www.loadingartist.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2011/01/04/born'
- imageSearch = compile(tagre("img", "src", r'(http://www\.loadingartist\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.loadingartist\.com/\d+/\d+/\d+/[^"]+/)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class LookingForGroup(_BasicScraper):
url = 'http://www.lfgcomic.com/'
+ rurl = escape(url)
stripUrl = url + 'page/%s/'
imageSearch = compile(tagre("img", "src", r'(http://cdn\.lfgcomic\.com/wp-content/uploads/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.lfgcomic\.com/page/\d+/)', after="navtop-prev"))
- starter = indirectStarter(url, compile(tagre("a", "href", r'(http://www\.lfgcomic\.com/page/\d+/)', after="feature-previous")))
+ prevSearch = compile(tagre("a", "href", r'(%spage/\d+/)' % rurl, after="navtop-prev"))
+ starter = indirectStarter(url, compile(tagre("a", "href", r'(%spage/\d+/)' % rurl, after="feature-previous")))
nameSearch = compile(r'/page/(\d+)/')
help = 'Index format: nnn'
diff --git a/dosagelib/plugins/m.py b/dosagelib/plugins/m.py
index 65a8b93a5..4d1e5b02d 100644
--- a/dosagelib/plugins/m.py
+++ b/dosagelib/plugins/m.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile, IGNORECASE
+from re import compile, escape, IGNORECASE
from ..scraper import _BasicScraper
from ..util import tagre
@@ -26,9 +26,10 @@ class MagickChicks(_BasicScraper):
class ManlyGuysDoingManlyThings(_BasicScraper):
url = 'http://thepunchlineismachismo.com/'
+ rurl = escape(url)
stripUrl = url + 'archives/comic/%s'
- imageSearch = compile(tagre("img", "src", r'(http://thepunchlineismachismo\.com/wp-content/uploads/\d+/\d+/\d+-\d+-\d+[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://thepunchlineismachismo\.com/archives/comic/[^"]+)', after="previous"))
+ imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/\d+-\d+-\d+[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%sarchives/comic/[^"]+)' % rurl, after="previous"))
help = 'Index format: ddmmyyyy'
@@ -66,9 +67,10 @@ class MegaTokyo(_BasicScraper):
class Meiosis(_BasicScraper):
url = 'http://meiosiswebcomic.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://meiosiswebcomic\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://meiosiswebcomic\.com/[^"]+)', after="navi-prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="navi-prev"))
help = 'Index format: yyyy/mm/ddmmyyyy'
@@ -91,9 +93,10 @@ class MenageA3(_BasicScraper):
class Melonpool(_BasicScraper):
url = 'http://www.melonpool.com/'
+ rurl = escape(url)
stripUrl = url + '?p=%s'
- imageSearch = compile(tagre("img", "src", r'(http://www\.melonpool\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.melonpool\.com/\?p=\d+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
help = 'Index format: n'
@@ -106,15 +109,16 @@ class Misfile(_BasicScraper):
class MyCartoons(_BasicScraper):
- url = 'http://mycartoons.de/'
- stripUrl = url + 'page/%s'
- imageSearch = (
- compile(tagre("img", "src", r'(http://mycartoons\.de/wp-content/cartoons/(?:[^"]+/)?\d+-\d+-\d+[^"]+)')),
- compile(tagre("img", "src", r'(http://mycartoons\.de/cartoons/[^"]+/\d+-\d+-\d+[^"]+)'))
- )
- prevSearch = compile(tagre("a", "href", r'(http://mycartoons\.de/page/[^"]+)') + "«")
- help = 'Index format: number'
- lang = 'de'
+ url = 'http://mycartoons.de/'
+ rurl = escape(url)
+ stripUrl = url + 'page/%s'
+ imageSearch = (
+ compile(tagre("img", "src", r'(%swp-content/cartoons/(?:[^"]+/)?\d+-\d+-\d+[^"]+)' % rurl)),
+ compile(tagre("img", "src", r'(%scartoons/[^"]+/\d+-\d+-\d+[^"]+)' % rurl)),
+ )
+ prevSearch = compile(tagre("a", "href", r'(%spage/[^"]+)' % rurl) + "«")
+ help = 'Index format: number'
+ lang = 'de'
class MysteriesOfTheArcana(_BasicScraper):
diff --git a/dosagelib/plugins/n.py b/dosagelib/plugins/n.py
index 835429a43..fbc4f8c99 100644
--- a/dosagelib/plugins/n.py
+++ b/dosagelib/plugins/n.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile
+from re import compile, escape
from ..scraper import _BasicScraper
from ..helpers import indirectStarter, bounceStarter
from ..util import tagre
@@ -23,17 +23,19 @@ class Namesake(_BasicScraper):
class NamirDeiter(_BasicScraper):
url = 'http://www.namirdeiter.com/'
+ rurl = escape(url)
stripUrl = url + 'comics/index.php?date=%s'
- imageSearch = compile(tagre("img", "src", r"'?(http://www\.namirdeiter\.com/comics/\d+\.jpg)'?", quote=""))
- prevSearch = compile(tagre("a", "href", r'(http://www\.namirdeiter\.com/comics/index\.php\?date=\d+)', quote="'")+"Previous")
+ imageSearch = compile(tagre("img", "src", r"'?(%scomics/\d+\.jpg)'?" % rurl, quote=""))
+ prevSearch = compile(tagre("a", "href", r'(%scomics/index\.php\?date=\d+)' % rurl, quote="'")+"Previous")
help = 'Index format: yyyymmdd'
class Nedroid(_BasicScraper):
url = 'http://nedroid.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://nedroid\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://nedroid\.com/\d+/\d+/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/name'
@@ -62,28 +64,30 @@ class NewWorld(_BasicScraper):
class Nicky510(_BasicScraper):
url = 'http://www.nickyitis.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.nickyitis\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.nickyitis\.com/comic/[^"]+)', after="Previous"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%scomic/[^"]+)' % rurl, after="Previous"))
help = 'Index format: stripname'
class NekkoAndJoruba(_BasicScraper):
url = 'http://www.nekkoandjoruba.com/'
stripUrl = url + '?p=%s'
- imageSearch = compile(r'‹')
help = 'Index format: nnn'
class NekoTheKitty(_BasicScraper):
url = 'http://www.nekothekitty.net/'
+ rurl = escape(url)
stripUrl = url + 'comics/%s'
- starter = bounceStarter(url, compile(tagre("a", "href", r'(http://www\.nekothekitty\.net/comics/[^"]+)') +
- tagre("img", "src", r'http://www\.nekothekitty\.net/files/smallnext.png')))
+ starter = bounceStarter(url, compile(tagre("a", "href", r'(%scomics/[^"]+)' % rurl) +
+ tagre("img", "src", r'%sfiles/smallnext\.png' % rurl)))
imageSearch = compile(tagre("img", "src", r'(http://(?:img\d+|www)\.smackjeeves\.com/images/uploaded/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.nekothekitty\.net/comics/[^"]+)') +
- tagre("img", "src", r'http://www\.nekothekitty\.net/files/smallprev.png'))
+ prevSearch = compile(tagre("a", "href", r'(%scomics/[^"]+)' % rurl) +
+ tagre("img", "src", r'%sfiles/smallprev\.png' % rurl))
help = 'Index format: n/n-name'
@@ -100,35 +104,40 @@ class NichtLustig(_BasicScraper):
class Nnewts(_BasicScraper):
url = 'http://nnewts.com/'
+ rurl = escape(url)
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"))
+ imageSearch = compile(tagre("img", "src", r'(%snewty/comics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s(?:nnewts-)?page-\d+/)' % rurl, after="navi-prev"))
help = 'Index format: page-number'
class Nodwick(_BasicScraper):
url = 'http://comic.nodwick.com/'
+ rurl = escape(url)
stripUrl = url + "?p=%s"
- imageSearch = compile(tagre("img", "src", r'(http://comic\.nodwick\.com/nodwickstrips/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://comic\.nodwick\.com/\?p=\d+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%snodwickstrips/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
help = 'Index format: stripnumber'
class NobodyScores(_BasicScraper):
url = 'http://nobodyscores.loosenutstudio.com/'
+ rurl = escape(url)
stripUrl = url + 'index.php?id=%s'
- imageSearch = compile(tagre("img", "src", r'(http://nobodyscores\.loosenutstudio\.com/comix/[^"]+)'))
+ imageSearch = compile(tagre("img", "src", r'(%scomix/[^"]+)' % rurl))
multipleImagesPerStrip = True
- prevSearch = compile(r'the one before ')
+ prevSearch = compile(r'the one before ' % rurl)
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"))
+ baseurl = 'http://noneedforbushido.com/'
+ rurl = escape(baseurl)
+ url = baseurl + 'latest/'
+ stripUrl = baseurl + '%s/'
+ imageSearch = compile(tagre("img", "src", r'(%scomics/comic/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="previous-comic-link"))
help = 'Index format: yyyy/comic/nnn'
diff --git a/dosagelib/plugins/num.py b/dosagelib/plugins/num.py
index 0e6cb7880..97c3201c3 100644
--- a/dosagelib/plugins/num.py
+++ b/dosagelib/plugins/num.py
@@ -11,7 +11,8 @@ from ..scraper import _BasicScraper
class NineteenNinetySeven(_BasicScraper):
name = '1997'
url = 'http://www.1977thecomic.com/'
- stripUrl = url + '%s'
+ stripUrl = url + '%s/'
+ firstStripUrl = stripUrl % '1977-comics/from-the-beginning-part-1'
imageSearch = compile(tagre("img", "src", r'(http://www\.1977thecomic\.com/comics-1977/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'([^"]+)')+"Previous")
help = 'Index format: yyyy/mm/dd/strip-name'
diff --git a/dosagelib/plugins/o.py b/dosagelib/plugins/o.py
index 299f0b0da..1db13cc93 100644
--- a/dosagelib/plugins/o.py
+++ b/dosagelib/plugins/o.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile
+from re import compile, escape
from ..scraper import _BasicScraper
from ..helpers import indirectStarter
from ..util import tagre, urlopen
@@ -10,20 +10,22 @@ from ..util import tagre, urlopen
class OctopusPie(_BasicScraper):
url = 'http://www.octopuspie.com/'
+ rurl = escape(url)
starter = indirectStarter(url,
- compile(tagre("a", "href", r'(http://www\.octopuspie\.com/[^"]+)') +
- tagre("img", "src", r'http://www\.octopuspie\.com/junk/latest\.png')))
+ compile(tagre("a", "href", r'(%s[^"]+)' % rurl) +
+ tagre("img", "src", r'%sjunk/latest\.png' % rurl)))
stripUrl = url + '%s'
- imageSearch = compile(tagre("img", "src", r'(http://www\.octopuspie\.com/strippy/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.octopuspie\.com/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%sstrippy/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy-mm-dd/nnn-strip-name'
class OddFish(_BasicScraper):
url = 'http://www.odd-fish.net/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.odd-fish\.net/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.odd-fish\.net/[^"]+)', after="navi-prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="navi-prev"))
help = 'Index format: stripname'
@@ -45,27 +47,30 @@ class Oglaf(_BasicScraper):
class OkCancel(_BasicScraper):
url = 'http://okcancel.com/'
+ rurl = escape(url)
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)'))
+ imageSearch = compile(tagre("img", "src", r'(%sstrips/okcancel\d{8}\.gif)' % rurl))
+ prevSearch = compile(tagre("div", "class", "previous") + tagre("a", "href", r'(%scomic/\d{1,4}\.html)' % rurl))
starter = indirectStarter(url, prevSearch)
help = 'Index format: yyyymmdd'
class OmakeTheater(_BasicScraper):
url = 'http://omaketheater.com/'
+ rurl = escape(url)
stripUrl = url + 'comic/%s'
imageSearch = compile(tagre("img", "src", r'(http://media\.omaketheater\.com/4koma/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://omaketheater\.com/comic/\d+/)', after="prev"))
+ prevSearch = compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, after="prev"))
starter = indirectStarter(url,
- compile(tagre("a", "href", r'(http://omaketheater\.com/comic/\d+/)')))
+ compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl)))
help = 'Index format: number (unpadded)'
class OnTheEdge(_BasicScraper):
url = 'http://ontheedgecomics.com/'
- stripUrl = 'http://ontheedgecomics.com/comic/%s'
- imageSearch = compile(r'')
help = 'Index format: nnn (unpadded)'
@@ -80,10 +85,11 @@ class OneQuestion(_BasicScraper):
class OrnerBoy(_BasicScraper):
url = 'http://www.orneryboy.com/'
+ rurl = escape(url)
stripUrl = url + 'index.php?comicID=%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(comics/\d+\.[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.orneryboy\.com/index\.php\?comicID=\d+)') +
+ prevSearch = compile(tagre("a", "href", r'(%sindex\.php\?comicID=\d+)' % rurl) +
tagre("img", "src", r'images/prev_a\.gif'))
help = 'Index format: number'
diff --git a/dosagelib/plugins/p.py b/dosagelib/plugins/p.py
index 37bdaa560..79688a101 100644
--- a/dosagelib/plugins/p.py
+++ b/dosagelib/plugins/p.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile
+from re import compile, escape
from ..scraper import _BasicScraper
from ..helpers import bounceStarter, queryNamer, indirectStarter
from ..util import tagre
@@ -10,9 +10,10 @@ from ..util import tagre
class PandyLand(_BasicScraper):
url = 'http://pandyland.net/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://pandyland\.net/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://pandyland\.net/\d+/)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/)' % rurl, after="prev"))
help = 'Index format: number'
@@ -27,10 +28,11 @@ class ParadigmShift(_BasicScraper):
class ParallelUniversum(_BasicScraper):
url = 'http://www.paralleluniversum.net/'
+ rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '001-der-comic-ist-tot'
- imageSearch = compile(tagre("img", "src", r'(http://www\.paralleluniversum\.net/comics/\d+-\d+-\d+[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.paralleluniversum\.net/[^"]+/)') +
+ imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+/)' % rurl) +
tagre("span", "class", "prev"))
help = 'Index format: number-stripname'
lang = 'de'
@@ -38,15 +40,17 @@ class ParallelUniversum(_BasicScraper):
class PartiallyClips(_BasicScraper):
url = 'http://partiallyclips.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://partiallyclips\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://partiallyclips\.com/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class PastelDefender(_BasicScraper):
- url = 'http://www.pasteldefender.com/coverbackcover.html'
- stripUrl = 'http://www.pasteldefender.com/%s.html'
+ baseurl = 'http://www.pasteldefender.com/'
+ url = baseurl + 'coverbackcover.html'
+ stripUrl = baseurl + '%s.html'
imageSearch = compile(r'next'))
- stripUrl = 'http://www.redmeat.com/redmeat/%s/index.html'
+ stripUrl = baseurl + '%s/index.html'
imageSearch = compile(r'
]*>')
prevSearch = compile(r'
previous')
help = 'Index format: yyyy-mm-dd'
diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py
index c127a7f96..a767e6d3f 100644
--- a/dosagelib/plugins/s.py
+++ b/dosagelib/plugins/s.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile, MULTILINE, IGNORECASE, sub
+from re import compile, escape, MULTILINE, IGNORECASE, sub
from os.path import splitext
from ..scraper import _BasicScraper
from ..helpers import indirectStarter, bounceStarter
@@ -11,9 +11,11 @@ from ..util import tagre
class SailorsunOrg(_BasicScraper):
url = 'http://sailorsun.org/'
+ rurl = escape(url)
stripUrl = url + '?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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ rurl = escape(url)
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
help = 'Index format: n (unpadded)'
@@ -27,19 +29,21 @@ class SamAndFuzzy(_BasicScraper):
class SandraAndWoo(_BasicScraper):
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'(http://www\.sandraandwoo\.com/comics/\d+-\d+-\d+-[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.sandraandwoo\.com/\d+/\d+/\d+/[^"]+/)', after="prev"))
+ 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):
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'(http://www\.sandraandwoo\.com/woode/comics/\d+-\d+-\d+-[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.sandraandwoo\.com/woode/\d+/\d+/\d+/[^"]+/)', after="prev"))
+ 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'
@@ -54,9 +58,10 @@ class ScaryGoRound(_BasicScraper):
class ScenesFromAMultiverse(_BasicScraper):
url = 'http://amultiverse.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://amultiverse\.com/files/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://amultiverse\.com/\d+\d+/\d+/\d+/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%sfiles/comics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+\d+/\d+/\d+/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
@@ -79,9 +84,10 @@ class SchoolBites(_BasicScraper):
class Schuelert(_BasicScraper):
url = 'http://www.schuelert.de/'
+ rurl = escape(url)
stripUrl = None
- imageSearch = compile(tagre("img", "src", r"(http://www.schuelert.de/wp-content/[^']+)", quote="'"))
- prevSearch = compile(tagre("a", "href", r'(http://www\.schuelert\.de/index\.php\?paged=\d+)') + "«")
+ imageSearch = compile(tagre("img", "src", r"(%swp-content/[^']+)" % rurl, quote="'"))
+ prevSearch = compile(tagre("a", "href", r'(%sindex\.php\?paged=\d+)' % rurl) + "«")
multipleImagesPerStrip = True
help = 'Index format: none'
lang = 'de'
@@ -89,10 +95,11 @@ class Schuelert(_BasicScraper):
class Science(_BasicScraper):
url = 'http://sci-ence.org/'
+ rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % 'periodic-table-element-ass'
- prevSearch = compile(tagre("a", "href", r'(http://sci-ence\.org/[^"]+/)', after="prev"))
- imageSearch = compile(tagre("img", "src", r'(http://sci-ence\.org/comics/\d+-\d+-\d+[^"]+)'))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+/)' % rurl, after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
help = 'Index format: stripname'
description = u'A comic about science, technology, skepticism, geekery, video games, atheism, and more.'
@@ -142,18 +149,20 @@ class Sheldon(_BasicScraper):
class Shivae(_BasicScraper):
url = 'http://shivae.net/'
+ rurl = escape(url)
stripUrl = url + '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"))
+ imageSearch = compile(tagre("img", "src", r'(%sfiles/comics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%sblog/[^"]+)' % rurl, after="Previous"))
help = 'Index format: yyyy/mm/dd/stripname'
# XXX disallowed by robots.txt
class _Shortpacked(_BasicScraper):
url = 'http://www.shortpacked.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- 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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/comic/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/comic/book-nn/mm-name1/name2'
@@ -189,9 +198,10 @@ class SkinDeep(_BasicScraper):
class SlightlyDamned(_BasicScraper):
url = 'http://www.sdamned.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.sdamned\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.sdamned\.com/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/number'
@@ -251,14 +261,15 @@ class SnowFlakes(_BasicScraper):
class SnowFlame(_BasicScraper):
url = 'http://www.snowflamecomic.com/'
+ rurl = escape(url)
stripUrl = url + '?comic=snowflame-%s-%s'
firstStripUrl = stripUrl % ('01', '01')
- imageSearch = compile(tagre("img", "src", r'(http://www\.snowflamecomic\.com/wp-content/uploads/\d+/\d+/[^"]+)', after="Snow[Ff]lame the fan made"))
+ imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/[^"]+)' % rurl, after="Snow[Ff]lame the fan made"))
prevSearch = compile(tagre("span", "class", "mininav-prev") +
- tagre("a", "href", r'(http://www\.snowflamecomic\.com/\?comic=snowflame[^"]+)'))
+ tagre("a", "href", r'(%s\?comic=snowflame[^"]+)' % rurl))
starter = bounceStarter(url,
compile(tagre("span", "class", "mininav-next") +
- tagre("a", "href", r'(http://www\.snowflamecomic\.com/\?comic=snowflame[^"]+)')))
+ tagre("a", "href", r'(%s\?comic=snowflame[^"]+)' % rurl)))
help = 'Index format: chapter-page'
def getStripIndexUrl(self, index):
@@ -276,25 +287,29 @@ class SnowFlame(_BasicScraper):
class SodiumEyes(_BasicScraper):
url = 'http://sodiumeyes.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://sodiumeyes\.com/comic/[^ ]+)', quote=""))
- prevSearch = compile(tagre("a", "href", r'(http://sodiumeyes\.com/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomic/[^ ]+)' % rurl, quote=""))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class Sorcery101(_BasicScraper):
- url = 'http://www.sorcery101.net/sorcery-101/'
+ baseurl = 'http://www.sorcery101.net/'
+ url = baseurl + 'sorcery-101/'
+ rurl = escape(baseurl)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.sorcery101\.net/wp-content/uploads/\d+/\d+/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.sorcery101\.net/sorcery-101/[^"]+)', after="previous-"))
+ imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%ssorcery-101/[^"]+)' % rurl, after="previous-"))
help = 'Index format: stripname'
class SpaceTrawler(_BasicScraper):
url = 'http://spacetrawler.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://spacetrawler\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://spacetrawler\.com/\d+/\d+/\d+/[^"]+)', after="navi-prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+)' % rurl, after="navi-prev"))
help = 'Index format: yyyy/mm/dd/stripname'
@@ -309,26 +324,29 @@ class SpareParts(_BasicScraper):
class Spinnerette(_BasicScraper):
url = 'http://www.spinnyverse.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.spinnyverse\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.spinnyverse\.com/[^"]+)', before="Previous Comic"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, before="Previous Comic"))
help = 'Index format: number'
class SPQRBlues(_BasicScraper):
url = 'http://spqrblues.com/IV/'
+ rurl = escape(url)
stripUrl = url + '?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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/\d+\.png)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
help = 'Index format: number'
# XXX disallowed by robots.txt
class _StationV3(_BasicScraper):
url = 'http://www.stationv3.com/'
+ rurl = escape(url)
stripUrl = url + '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)') +
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%sd/\d+\.html)' % rurl) +
tagre("img", "src", r'http://www\.stationv3\.com/images/previous\.gif'))
help = 'Index format: yyyymmdd'
@@ -343,9 +361,10 @@ class StickyDillyBuns(_BasicScraper):
class Stubble(_BasicScraper):
url = 'http://stubblecomics.com/'
+ rurl = escape(url)
stripUrl = url + '?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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="navi-prev"))
help = 'Index format: number'
@@ -386,17 +405,19 @@ class StuffNoOneToldMe(_BasicScraper):
class StrawberryDeathCake(_BasicScraper):
url = 'http://strawberrydeathcake.com/'
+ rurl = escape(url)
stripUrl = url + 'archive/%s/'
- imageSearch = compile(tagre("img", "src", r'(http://strawberrydeathcake\.com/wp-content/webcomic/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://strawberrydeathcake\.com/archive/[^"]+)', after="previous"))
+ imageSearch = compile(tagre("img", "src", r'(%swp-content/webcomic/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%sarchive/[^"]+)' % rurl, after="previous"))
help = 'Index format: stripname'
class SuburbanTribe(_BasicScraper):
url = 'http://www.pixelwhip.com/'
+ rurl = escape(url)
stripUrl = url + '?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"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
help = 'Index format: nnnn'
@@ -430,9 +451,10 @@ class StarCrossdDestiny(_BasicScraper):
class Spamusement(_BasicScraper):
url = 'http://spamusement.com/'
+ rurl = escape(url)
stripUrl = url + 'index.php/comics/view/%s'
- imageSearch = compile(r'
', IGNORECASE)
+ imageSearch = compile(r'
' % rurl, IGNORECASE)
help = 'Index format: n (unpadded)'
starter = indirectStarter(url, prevSearch)
@@ -448,7 +470,8 @@ class _StrangeCandy(_BasicScraper):
class SupernormalStep(_BasicScraper):
url = 'http://supernormalstep.com/'
+ rurl = escape(url)
stripUrl = url + '?p=%s'
- imageSearch = compile(tagre("img", "src", r'(http://supernormalstep\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://supernormalstep\.com/\?p=\d+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
help = 'Index format: number'
diff --git a/dosagelib/plugins/t.py b/dosagelib/plugins/t.py
index 1e7ca460f..977b3490a 100644
--- a/dosagelib/plugins/t.py
+++ b/dosagelib/plugins/t.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile, IGNORECASE
+from re import compile, escape, IGNORECASE
from ..scraper import _BasicScraper
from ..helpers import indirectStarter
from ..util import tagre
@@ -34,12 +34,13 @@ class TheNoob(_BasicScraper):
class TheOrderOfTheStick(_BasicScraper):
- url = 'http://www.giantitp.com/comics/oots0863.html'
- stripUrl = 'http://www.giantitp.com/comics/oots%s.html'
+ baseurl = 'http://www.giantitp.com/'
+ url = baseurl + 'comics/oots0863.html'
+ stripUrl = baseurl + 'comics/oots%s.html'
imageSearch = compile(r'
')
prevSearch = compile(r'
')
multipleImagesPerStrip = True
prevSearch = compile(r'\d{4} -\s+\d{4}')
@@ -65,19 +67,21 @@ class TheWotch(_BasicScraper):
class ThisIsIndexed(_BasicScraper):
url = 'http://thisisindexed.com/'
+ rurl = escape(url)
stripUrl = url + 'page/%s'
- imageSearch = compile(tagre("img", "src", r'(http://thisisindexed\.com/wp-content/uploads/\d+/\d+/card[^"]+)'))
+ imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/card[^"]+)' % rurl))
multipleImagesPerStrip = True
prevSearch = compile(tagre("div", "class", "nav-previous") +
- tagre("a", "href", r'(http://thisisindexed\.com/page/\d+/)'))
+ tagre("a", "href", r'(%spage/\d+/)' % rurl))
help = 'Index format: number'
class ThunderAndLightning(_BasicScraper):
url = 'http://www.talcomic.com/wp/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- prevSearch = compile(tagre("a", "href", r'(http://www\.talcomic\.com/wp/[^"]+)', after="prev"))
- imageSearch = compile(tagre("img", "src", r'(http://www\.talcomic\.com/wp/comics/[^"]+)'))
+ prevSearch = compile(tagre("a", "href", r'(%swp/[^"]+)' % rurl, after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%swp/comics/[^"]+)' % rurl))
help = 'Index format: yyyy/mm/dd/page-nn'
@classmethod
@@ -87,17 +91,19 @@ class ThunderAndLightning(_BasicScraper):
class TinyKittenTeeth(_BasicScraper):
url = 'http://www.tinykittenteeth.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.tinykittenteeth\.com/comics/[^"]+)'))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="Previous"))
help = 'Index format: yyyy/mm/dd/stripname (unpadded)'
class ToonHole(_BasicScraper):
url = 'http://www.toonhole.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://www\.toonhole\.com/comics/\d+-\d+-\d+[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://www\.toonhole\.com/\d+/\d+/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/stripname'
def shouldSkipUrl(self, url):
@@ -115,9 +121,10 @@ class _TwoLumps(_BasicScraper):
class TwoTwoOneFour(_BasicScraper):
url = 'http://www.nitrocosm.com/go/2214_classic/'
+ rurl = escape(url)
stripUrl = url + '%s/'
imageSearch = compile(tagre("img", "src", r'(http://content\.nitrocosm\.com/[^"]+)', before="gallery_display"))
- prevSearch = compile(tagre("a", "href", r'(http://www\.nitrocosm\.com/go/2214_classic/\d+/)', after="Previous"))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/)' % rurl, after="Previous"))
help = 'Index format: n (unpadded)'
@@ -131,32 +138,37 @@ class TheWhiteboard(_BasicScraper):
class HMHigh(_BasicScraper):
name = 'TheFallenAngel/HMHigh'
- url = 'http://www.thefallenangel.co.uk/hmhigh/'
+ baseurl = 'http://www.thefallenagel.co.uk/'
+ url = baseurl + 'hmhigh/'
+ rurl = escape(baseurl)
stripUrl = url + '?id=%s'
- imageSearch = compile(r'Prev')
+ imageSearch = compile(r'
Prev' % rurl)
help = 'Index format: nnn'
class TheOuterQuarter(_BasicScraper):
url = 'http://theouterquarter.com/'
+ rurl = escape(url)
stripUrl = url + 'comic/%s'
- imageSearch = compile(r'
')
help = 'Index format: nnn'
class ThreePanelSoul(_BasicScraper):
url = 'http://threepanelsoul.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://threepanelsoul\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://threepanelsoul\.com/\d+/\d+/\d+/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class TracyAndTristan(_BasicScraper):
url = 'http://tandt.thecomicseries.com/'
+ rurl = escape(url)
stripUrl = url + 'comics/%s'
- imageSearch = compile(tagre("img", "src", r'(http://tandt\.thecomicseries\.com/images/comics/[^"]+)'))
+ imageSearch = compile(tagre("img", "src", r'(%simages/comics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(/comics/\d+)', after="prev"))
help = 'Index format: number'
diff --git a/dosagelib/plugins/w.py b/dosagelib/plugins/w.py
index ce6642338..47b622589 100644
--- a/dosagelib/plugins/w.py
+++ b/dosagelib/plugins/w.py
@@ -2,7 +2,7 @@
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
-from re import compile, IGNORECASE
+from re import compile, escape, IGNORECASE
from ..scraper import _BasicScraper
from ..util import tagre
@@ -11,8 +11,9 @@ from ..helpers import indirectStarter
class WapsiSquare(_BasicScraper):
url = 'http://wapsisquare.com/'
+ rurl = escape(url)
stripUrl = url + 'comic/%s'
- imageSearch = compile(r']+?>Previous')
help = 'Index format: stripname'
@@ -35,8 +36,8 @@ class WayfarersMoon(_BasicScraper):
class WebDesignerCOTW(_BasicScraper):
url = 'http://www.webdesignerdepot.com/'
- starter = indirectStarter(url,
- compile(tagre("a", "href", r'(http://www\.webdesignerdepot\.com/\d+/\d+/[^"]+/)')))
+ rurl = escape(url)
+ starter = indirectStarter(url, compile(tagre("a", "href", r'(%s\d+/\d+/[^"]+/)' % rurl)))
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2009/11/comics-of-the-week-1'
imageSearch = (
@@ -46,7 +47,7 @@ class WebDesignerCOTW(_BasicScraper):
compile(tagre("img", "src", r'(http://netdna\.webdesignerdepot\.com/uploads/comics/\d+\.[^"]+)')),
)
multipleImagesPerStrip = True
- prevSearch = compile(tagre("link", "href", r"(http://www\.webdesignerdepot\.com/\d+/\d+/[^']+)", before='prev', quote="'"))
+ prevSearch = compile(tagre("link", "href", r"(%s\d+/\d+/[^']+)" % rurl, before='prev', quote="'"))
help = 'Index format: yyyy/mm/stripname'
description = "The content revolves around web design, blogging and funny situations that we encounter in our daily lives as designers and this week we focus on Christmas. These great cartoons are created by Jerry King, an award-winning cartoonist who’s one of the most published, prolific and versatile cartoonists in the world today."
@@ -63,24 +64,28 @@ class WebDesignerCOTW(_BasicScraper):
class WeCanSleepTomorrow(_BasicScraper):
url = 'http://wecansleeptomorrow.com/'
+ rurl = escape(url)
stripUrl = url + '%s/'
- imageSearch = compile(tagre("img", "src", r'(http://wecansleeptomorrow\.com/comics/[^"]+)'))
- prevSearch = compile(tagre("a", "href", r'(http://wecansleeptomorrow\.com/[^"]+)', after="prev"))
+ imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
+ prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class WhiteNinja(_BasicScraper):
- url = 'http://www.whiteninjacomics.com/comics.shtml'
- stripUrl = 'http://www.whiteninjacomics.com/comics/%s.shtml'
+ baseurl = 'http://www.whiteninjacomics.com/'
+ url = baseurl + 'comics.shtml'
+ stripUrl = baseurl + 'comics/%s.shtml'
imageSearch = compile(r'