dosage/dosagelib/plugins/y.py

22 lines
759 B
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2013-02-05 18:51:46 +00:00
# Copyright (C) 2012-2013 Bastian Kleineidam
2012-11-21 20:57:26 +00:00
from re import compile
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
class YAFGC(_BasicScraper):
url = 'http://yafgc.net/'
stripUrl = url + '?id=%s'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '1'
2013-03-19 19:45:18 +00:00
imageSearch = compile(tagre("img", "src", r'(http://(?:www\.)?yafgc\.net/img/comic/\d+\.jpg)'))
prevSearch = compile(tagre("a", "href", r'(http://(?:www\.)?yafgc\.net/\?id=\d+)') +
2012-11-26 06:13:32 +00:00
tagre("img", "src", r'/img/navbar/go_to_previous\.gif'))
2013-03-19 19:45:18 +00:00
help = 'Index format: number'
def prevUrlModifier(cls, prevUrl):
if prevUrl:
return prevUrl.replace("www.yafgc.net", "yafgc.net")