dosage/dosagelib/plugins/v.py

38 lines
1.2 KiB
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2012-11-21 20:57:26 +00:00
# Copyright (C) 2012 Bastian Kleineidam
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
2012-12-02 17:35:06 +00:00
class VGCats(_BasicScraper):
2012-06-20 19:58:13 +00:00
latestUrl = 'http://www.vgcats.com/comics/'
2012-12-02 17:35:06 +00:00
stripUrl = latestUrl + '?strip_id=%s'
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 VGCatsSuper(VGCats):
2012-06-20 19:58:13 +00:00
name = 'VGCats/Super'
latestUrl = 'http://www.vgcats.com/super/'
2012-12-02 17:35:06 +00:00
stripUrl = latestUrl + '?strip_id=%s'
2012-06-20 19:58:13 +00:00
2012-12-02 17:35:06 +00:00
class VGCatsAdventure(VGCats):
2012-06-20 19:58:13 +00:00
name = 'VGCats/Adventure'
latestUrl = 'http://www.vgcats.com/ffxi/'
2012-12-02 17:35:06 +00:00
stripUrl = latestUrl + '?strip_id=%s'
2012-06-20 19:58:13 +00:00
class ViiviJaWagner(_BasicScraper):
latestUrl = 'http://www.hs.fi/viivijawagner/'
stripUrl = None
imageSearch = compile(tagre("link", "href", r'(http://hs\d+\.snstatic\.fi/webkuva/oletus/[^"]+)', before="image_src"))
prevSearch = compile(tagre("a", "href", r'(/viivijawagner/[^"]+)', before="prev-cm"))
2012-11-26 06:13:32 +00:00
help = 'Index format: none'