2012-06-20 20:41:04 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 15:50:57 +00:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2013-04-10 16:19:11 +00:00
|
|
|
from re import compile, escape
|
2012-10-11 10:03:12 +00:00
|
|
|
from ..scraper import _BasicScraper
|
|
|
|
from ..helpers import indirectStarter
|
2014-03-26 18:59:42 +00:00
|
|
|
from ..util import tagre
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class OctopusPie(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.octopuspie.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-02-04 20:00:26 +00:00
|
|
|
starter = indirectStarter(url,
|
2013-04-10 16:19:11 +00:00
|
|
|
compile(tagre("a", "href", r'(%s[^"]+)' % rurl) +
|
|
|
|
tagre("img", "src", r'%sjunk/latest\.png' % rurl)))
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2007-05-14/001-pea-wiggle'
|
2013-04-10 16:19:11 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%sstrippy/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd/nnn-strip-name'
|
|
|
|
|
|
|
|
|
|
|
|
class OddFish(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.odd-fish.net/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-02-04 20:00:26 +00:00
|
|
|
stripUrl = url + '%s/'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % 'tv-tentacles'
|
2013-04-10 16:19:11 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="navi-prev"))
|
2012-11-21 20:57:26 +00:00
|
|
|
help = 'Index format: stripname'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class Oglaf(_BasicScraper):
|
|
|
|
url = 'http://oglaf.com/'
|
|
|
|
stripUrl = url + '%s/'
|
2013-04-04 16:30:02 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://media\.oglaf\.com/comic/[^"]+)', before="strip"))
|
2013-11-07 19:47:31 +00:00
|
|
|
prevSearch = (
|
|
|
|
# first search for "next page" URLs
|
|
|
|
compile(tagre("a", "href", r'(/[^"]+/\d+/)') + tagre("div", "id", "nx")),
|
|
|
|
# then for "prev story"
|
|
|
|
compile(tagre("a", "href", r'(/[^"]+)') + tagre("div", "id", "pvs?")),
|
|
|
|
)
|
|
|
|
help = 'Index format: stripname'
|
2013-04-04 16:30:02 +00:00
|
|
|
adult = True
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2014-01-31 03:45:50 +00:00
|
|
|
class OhJoySexToy(_BasicScraper):
|
|
|
|
url = 'http://www.ohjoysextoy.com/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % 'introduction'
|
|
|
|
imageSearch = compile(tagre("div", "class", r'comicpane') + "\s*.*\s*" + tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after='navi navi-prev'))
|
|
|
|
textSearch = compile(tagre("div", "class", r'comicpane') + "\s*.*\s*" + tagre("img", "alt", r'([^"]+)'))
|
|
|
|
help = 'Index Format: name'
|
|
|
|
adult = True
|
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class OkCancel(_BasicScraper):
|
|
|
|
url = 'http://okcancel.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + 'comic/%s.html'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2013-04-10 16:19:11 +00:00
|
|
|
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))
|
2013-03-06 19:21:10 +00:00
|
|
|
starter = indirectStarter(url, prevSearch)
|
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2013-02-06 21:27:40 +00:00
|
|
|
class OmakeTheater(_BasicScraper):
|
|
|
|
url = 'http://omaketheater.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
2013-02-06 21:27:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://media\.omaketheater\.com/4koma/[^"]+)'))
|
2013-04-10 16:19:11 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, after="prev"))
|
2013-02-06 21:27:40 +00:00
|
|
|
starter = indirectStarter(url,
|
2013-04-10 16:19:11 +00:00
|
|
|
compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl)))
|
2013-02-06 21:27:40 +00:00
|
|
|
help = 'Index format: number (unpadded)'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class OnTheEdge(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://ontheedgecomics.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'ote0001'
|
2013-04-10 16:19:11 +00:00
|
|
|
imageSearch = compile(r'<img src="(%scomics/.+?)"' % rurl)
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r'<a href="([^"]+)" rel="prev">')
|
|
|
|
help = 'Index format: nnn (unpadded)'
|
|
|
|
|
|
|
|
|
2013-06-24 18:19:33 +00:00
|
|
|
class OnTheFasttrack(_BasicScraper):
|
2014-11-14 19:09:42 +00:00
|
|
|
url = 'http://onthefastrack.com/'
|
|
|
|
stripUrl = url + 'comics/%s'
|
|
|
|
firstStripUrl = stripUrl % 'november-13-2000'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://safr\.kingfeatures\.com/idn/test/zone/xml/content\.php\?file=.+?)'))
|
2014-11-14 19:37:06 +00:00
|
|
|
prevSearch = compile(r'id="previouscomic" class="button white"><a href="(%scomics/[a-z0-9-]+/)"' % url)
|
2013-06-24 18:19:33 +00:00
|
|
|
description = u'On The Fasttrack by Bill Holbrook'
|
2014-11-14 19:09:42 +00:00
|
|
|
help = 'Index format: monthname-dd-yyyy'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
name = pageUrl.rsplit('/', 3)[2]
|
|
|
|
if name == "onthefastrack.com":
|
|
|
|
import datetime
|
|
|
|
name = datetime.date.today().strftime("%B-%d-%Y")
|
|
|
|
# name.title ensures that the comics are named the same
|
|
|
|
# as in the previous scraper
|
|
|
|
return "%s.gif" % name.title()
|
2013-06-24 18:19:33 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class OneQuestion(_BasicScraper):
|
2013-11-12 17:33:14 +00:00
|
|
|
url = 'http://onequestioncomic.com/'
|
2013-02-04 20:00:26 +00:00
|
|
|
stripUrl = url + 'comic.php?strip_id=%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2013-04-11 16:27:43 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'((?:\.\./)?istrip_files/strips/\d+\.\w{3,4})'))
|
2012-11-21 20:57:26 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(comic\.php\?strip_id=\d+)') + tagre("img", "src", r'img/arrow_prev\.jpg'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
2013-03-12 20:23:26 +00:00
|
|
|
class OrnerBoy(_BasicScraper):
|
|
|
|
url = 'http://www.orneryboy.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-12 20:23:26 +00:00
|
|
|
stripUrl = url + 'index.php?comicID=%s'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(comics/\d+\.[^"]+)'))
|
2013-04-10 16:19:11 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%sindex\.php\?comicID=\d+)' % rurl) +
|
2013-03-12 20:23:26 +00:00
|
|
|
tagre("img", "src", r'images/prev_a\.gif'))
|
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class OurHomePlanet(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://gdk.gd-kun.net/'
|
|
|
|
stripUrl = url + '%s.html'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '01'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src="(pages/comic.+?)"')
|
|
|
|
prevSearch = compile(r'coords="50,18,95,65".+?href="(.+?\.html)".+?alt=')
|
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
|
|
|
class OverCompensating(_BasicScraper):
|
2013-04-14 07:02:14 +00:00
|
|
|
description = u'OVERCOMPENSATING: The Journal Comic With a Seething Disdain for Reality.'
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.overcompensating.com/'
|
2013-11-12 17:33:14 +00:00
|
|
|
stripUrl = url + 'oc/index.php?comic=%s'
|
2013-07-18 18:39:53 +00:00
|
|
|
firstStripUrl = stripUrl % '0'
|
2013-11-12 17:33:14 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/oc/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href",
|
|
|
|
r'(/oc/index\.php\?comic=\d+)', after="go back"))
|
2013-07-18 18:39:53 +00:00
|
|
|
help = 'Index format: number'
|