- Modified OnTheFasttrack adapting the new API.
This commit is contained in:
parent
cd48801b0d
commit
c63f927e5c
1 changed files with 16 additions and 7 deletions
23
dosagelib/plugins/o.py
Executable file → Normal file
23
dosagelib/plugins/o.py
Executable file → Normal file
|
@ -92,14 +92,23 @@ class OnTheEdge(_BasicScraper):
|
||||||
|
|
||||||
|
|
||||||
class OnTheFasttrack(_BasicScraper):
|
class OnTheFasttrack(_BasicScraper):
|
||||||
url = 'http://www.onthefastrack.com/'
|
url = 'http://onthefastrack.com/'
|
||||||
rurl = escape(url)
|
stripUrl = url + 'comics/%s'
|
||||||
stripUrl = url + '?webcomic1=%s'
|
firstStripUrl = stripUrl % 'november-13-2000'
|
||||||
firstStripUrl = stripUrl % '2010-08-09'
|
imageSearch = compile(tagre("img", "src", r'(http://safr\.kingfeatures\.com/idn/test/zone/xml/content\.php\?file=.+?)'))
|
||||||
imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/[^"]+-\d+-\d+\.[^"]+)' % rurl))
|
prevSearch = compile(r'<a href="(http://onthefastrack.com/comics/[a-z0-9-]+/)"(><Previous| rel="prev)')
|
||||||
prevSearch = compile(tagre("a", "href", r'(%s\?webcomic1=[^"]+)' % rurl, after="prev"))
|
|
||||||
description = u'On The Fasttrack by Bill Holbrook'
|
description = u'On The Fasttrack by Bill Holbrook'
|
||||||
help = 'Index format: yyyy-mm-dd'
|
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()
|
||||||
|
|
||||||
|
|
||||||
class OneQuestion(_BasicScraper):
|
class OneQuestion(_BasicScraper):
|
||||||
|
|
Loading…
Reference in a new issue