dosage/dosagelib/plugins/v.py

39 lines
1.1 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-11-26 06:13:32 +00:00
# XXX make dynamic
2012-06-20 19:58:13 +00:00
class _VGCats(_BasicScraper):
latestUrl = 'http://www.vgcats.com/comics/'
imageSearch = compile(r'<img src="(images/\d{6}\..+?)"')
prevSearch = compile(r'<a href="(\?strip_id=\d+)"><img src="back.gif" border="0"')
help = 'Index format: n (unpadded)'
@property
2012-11-13 18:10:19 +00:00
def stripUrl(self):
2012-06-20 19:58:13 +00:00
return self.latestUrl + '?strip_id=%s'
class Super(_VGCats):
name = 'VGCats/Super'
latestUrl = 'http://www.vgcats.com/super/'
class Adventure(_VGCats):
name = 'VGCats/Adventure'
latestUrl = 'http://www.vgcats.com/ffxi/'
class ViiviJaWagner(_BasicScraper):
latestUrl = 'http://www.hs.fi/viivijawagner/'
2012-11-26 06:13:32 +00:00
imageSearch = compile(tagre("link", "href", r'(http://hs12\.snstatic\.fi/webkuva/oletus/[^"]+)', before="image_src"))
prevSearch = compile(tagre("a", "href", r'(/viivijawagner/\d+)', before="prev-cm"))
help = 'Index format: none'