dosage/dosagelib/plugins/l.py

66 lines
2.8 KiB
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2013-01-28 17:52:26 +00:00
# Copyright (C) 2012-2013 Bastian Kleineidam
2012-06-20 19:58:13 +00:00
2012-11-21 20:57:26 +00:00
from re import compile
2012-10-11 10:03:12 +00:00
from ..scraper import _BasicScraper
from ..helpers import indirectStarter
2012-11-21 20:57:26 +00:00
from ..util import tagre
2012-06-20 19:58:13 +00:00
class LasLindas(_BasicScraper):
url = 'http://laslindas.katbox.net/'
2013-02-19 19:58:04 +00:00
stripUrl = url + 'comic/%s/'
2013-02-13 16:52:32 +00:00
imageSearch = compile(tagre("img", "src", r'(http://laslindas\.katbox\.net/wp-content/uploads/[^"]+)', after="attachment-full"))
prevSearch = compile(tagre("a", "href", r'(http://laslindas\.katbox\.net/comic/[^"]+)', 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):
url = 'http://www.leasticoulddo.com/'
stripUrl = url + 'comic/%s'
imageSearch = compile(tagre("img", "src", r'(http://cdn\.leasticoulddo\.com/wp-content/uploads/\d+/\d+/\d{8}\.\w{1,4})'))
prevSearch = compile(tagre("a", "href", r'(http://www\.leasticoulddo\.com/comic/\d+/)', after="Previous"))
starter = indirectStarter(url,
compile(tagre("a", "href", r'(http://www\.leasticoulddo\.com/comic/\d+/)', after="feature-comic")))
help = 'Index format: yyyymmdd'
2012-06-20 19:58:13 +00:00
class Lint(_BasicScraper):
url = 'http://www.purnicellin.com/lint/'
stripUrl = url + '%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(http://www.purnicellin.com/lint/comics/.+?)"')
prevSearch = compile(r'\| <a href="([^"]+)" rel="prev">')
help = 'Index format: yyyy/mm/dd/num-name'
2013-03-06 19:21:10 +00:00
class LittleGamers(_BasicScraper):
url = 'http://www.little-gamers.com/'
stripUrl = url + '%s/'
imageSearch = compile(tagre("img", "src", r'(http://little-gamers\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://www\.little-gamers.com/[^"]+)', before="comic-nav-prev-link"))
help = 'Index format: yyyy/mm/dd/name'
class LoadingArtist(_BasicScraper):
url = 'http://www.loadingartist.com/'
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"))
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/'
stripUrl = url + 'page/%s/'
imageSearch = compile(tagre("meta", "content", r'(http://cdn\.lfgcomic\.com/wp-content/uploads/[^"]+)', before="og:image"))
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")))
nameSearch = compile(r'/page/(\d+)/')
2012-06-20 19:58:13 +00:00
help = 'Index format: nnn'
@classmethod
2012-06-20 19:58:13 +00:00
def namer(self, imageUrl, pageUrl):
return self.nameSearch.search(pageUrl).group(1)