dosage/dosagelib/plugins/v.py

66 lines
2.2 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2014-01-05 15:50:57 +00:00
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
2012-11-21 20:57:26 +00:00
from __future__ import absolute_import, division, print_function
2012-11-26 06:13:32 +00:00
from re import compile
2012-06-20 19:58:13 +00:00
2012-10-11 10:03:12 +00:00
from ..scraper import _BasicScraper
2012-11-26 06:13:32 +00:00
from ..util import tagre
2012-06-20 19:58:13 +00:00
2013-01-29 20:23:59 +00:00
class VampireCheerleaders(_BasicScraper):
url = 'http://www.vampirecheerleaders.net/'
stripUrl = url + 'strips-vc/%s'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % 'fang_service'
2013-01-29 20:23:59 +00:00
imageSearch = compile(tagre("img", "src", r'(/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://www\.vampirecheerleaders\.net/strips-vc/[^"]+)', before="cndprev"))
help = 'Index format: name'
2012-12-02 17:35:06 +00:00
class VGCats(_BasicScraper):
url = 'http://www.vgcats.com/comics/'
stripUrl = url + '?strip_id=%s'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '0'
2012-12-02 17:35:06 +00:00
imageSearch = compile(tagre("img", "src", r'(images/\d{6}\.[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(\?strip_id=\d+)') +
tagre("img", "src", r"back\.gif"))
2012-06-20 19:58:13 +00:00
help = 'Index format: n (unpadded)'
2012-12-02 17:35:06 +00:00
class VGCatsAdventure(VGCats):
2012-06-20 19:58:13 +00:00
name = 'VGCats/Adventure'
url = 'http://www.vgcats.com/ffxi/'
stripUrl = url + '?strip_id=%s'
2012-06-20 19:58:13 +00:00
class VGCatsSuper(VGCats):
name = 'VGCats/Super'
url = 'http://www.vgcats.com/super/'
stripUrl = url + '?strip_id=%s'
2012-12-08 20:30:51 +00:00
class VictimsOfTheSystem(_BasicScraper):
url = 'http://www.votscomic.com/'
stripUrl = url + '?id=%s.jpg'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '070103-002452'
2012-12-08 20:30:51 +00:00
imageSearch = compile(tagre("img", "src", r'(comicpro/strips/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(\?id=\d+-\d+\.jpg)') +
"Previous")
2012-12-08 20:30:51 +00:00
help = 'Index format: nnn-nnn'
2012-06-20 19:58:13 +00:00
class ViiviJaWagner(_BasicScraper):
url = 'http://www.hs.fi/viivijawagner/'
stripUrl = None
2015-04-18 20:45:13 +00:00
imageSearch = compile(tagre("img", "src", r'(http://hs\d+\.snstatic\.fi/webkuva/sarjis/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(/viivijawagner/[^"]+)',
before="prev-cm"))
2012-11-26 06:13:32 +00:00
help = 'Index format: none'
2015-04-18 20:45:13 +00:00
lang = 'fi'
2012-12-07 23:45:18 +00:00
@classmethod
def namer(cls, imageUrl, pageUrl):
return imageUrl.split('=')[1]