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
|
2013-04-25 19:06:12 +00:00
|
|
|
from ..helpers import bounceStarter, indirectStarter
|
2012-11-21 20:57:26 +00:00
|
|
|
from ..util import tagre
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2013-04-25 19:06:12 +00:00
|
|
|
class Lackadaisy(_BasicScraper):
|
|
|
|
description = u'Alcohol-running cats in prohibition St. Louis'
|
|
|
|
baseUrl = 'http://lackadaisy.foxprints.com/'
|
|
|
|
url = baseUrl + 'comic.php'
|
|
|
|
stripUrl = baseUrl + 'comic.php?comicid=%s'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.lackadaisycats\.com/comic/[^"]*)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r"(/comic\.php\?comicid=[0-9]+)") + "< Previous")
|
|
|
|
help = 'Index format: n'
|
|
|
|
starter = bounceStarter(url,
|
|
|
|
compile(tagre("a", "href", r"(/comic.php\?comicid=[0-9]+)") + "Next"))
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
"""Use comic id for filename."""
|
|
|
|
num = pageUrl.rsplit('=', 1)[-1]
|
|
|
|
ext = imageUrl.rsplit('.', 1)[-1]
|
|
|
|
return 'lackadaisy_%s.%s' % (num, ext)
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class LasLindas(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://laslindas.katbox.net/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-02-19 19:58:04 +00:00
|
|
|
stripUrl = url + 'comic/%s/'
|
2013-04-10 16:19:11 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/[^"]+)' % rurl, after="attachment-full"))
|
2013-04-04 16:30:02 +00:00
|
|
|
multipleImagesPerStrip = True
|
2013-04-10 16:19:11 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%scomic/[^"]+)' % rurl, after="previous"))
|
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 LeastICouldDo(_BasicScraper):
|
2013-04-14 07:02:14 +00:00
|
|
|
description = u'A daily webcomic series about the life of Rayne Summers. Created by Ryan Sohmer and Lar deSouza.'
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://www.leasticoulddo.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + 'comic/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '20130109'
|
2013-11-12 17:33:14 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/\d{8,9}\.\w{1,4})' % rurl))
|
2013-04-10 16:19:11 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, after="Previous"))
|
2013-03-06 19:21:10 +00:00
|
|
|
starter = indirectStarter(url,
|
2013-04-10 16:19:11 +00:00
|
|
|
compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, after="feature-comic")))
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class Lint(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.purnicellin.com/lint/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2004/01/10/01102004'
|
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: yyyy/mm/dd/num-name'
|
|
|
|
|
|
|
|
|
2013-06-24 18:27:43 +00:00
|
|
|
class LinuxComFridayFunnies(_BasicScraper):
|
|
|
|
description = u"Linux.com: Friday Funnies"
|
|
|
|
url = 'https://www.linux.com/news/friday-funnies/'
|
|
|
|
stripUrl = url + '%s'
|
|
|
|
firstStripUrl = stripUrl % 'the-road-to-japan'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(/news/friday-funnies/episode/[^"]+\?format=image[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(/news/friday-funnies/[^"]+)') + "Previous")
|
|
|
|
help = 'Index format: stripname'
|
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class LittleGamers(_BasicScraper):
|
2013-04-14 07:02:14 +00:00
|
|
|
description = u'The comic everyone knows, but no one reads'
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://www.little-gamers.com/'
|
|
|
|
stripUrl = url + '%s/'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '2000/12/01/99'
|
2013-03-06 19:21:10 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://little-gamers\.com/comics/[^"]+)'))
|
2013-03-26 16:36:06 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.little-gamers\.com/[^"]+)', before="comic-nav-prev-link"))
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/name'
|
|
|
|
|
|
|
|
|
2013-03-06 19:00:30 +00:00
|
|
|
class LoadingArtist(_BasicScraper):
|
2013-04-14 07:02:14 +00:00
|
|
|
description = u'A webcomic by Gregor Czaykowski'
|
2013-03-06 19:00:30 +00:00
|
|
|
url = 'http://www.loadingartist.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-06 19:00:30 +00:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2011/01/04/born'
|
2014-03-26 18:59:42 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/[^"]+)' % rurl))
|
2013-04-10 16:19:11 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+/)' % rurl, after="prev"))
|
2013-03-06 19:00:30 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/stripname'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class LookingForGroup(_BasicScraper):
|
2013-02-12 16:55:13 +00:00
|
|
|
url = 'http://www.lfgcomic.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-02-12 16:55:13 +00:00
|
|
|
stripUrl = url + 'page/%s/'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2014-07-01 21:44:01 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://(?:www|cdn)\.lfgcomic\.com/wp-content/uploads/\d+/\d+/lfg[^"]+)'))
|
|
|
|
#http://www.lfgcomic.com/wp-content/uploads/2014/06/lfg2827-787-jun30-14.gif
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%spage/[-0-9]+/)' % rurl, after="comic-nav-prev"))
|
2013-04-10 21:57:09 +00:00
|
|
|
starter = indirectStarter(url,
|
2014-07-01 21:44:01 +00:00
|
|
|
compile(tagre("a", "href", r'(%spage/[-0-9]+/)' % rurl, after="feature-item-link")))
|
2013-04-10 21:57:09 +00:00
|
|
|
nameSearch = compile(r'/page/([-0-9]+)/')
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: nnn'
|