2012-06-20 22:41:04 +02:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2013-02-05 19:51:46 +01:00
|
|
|
# Copyright (C) 2012-2013 Bastian Kleineidam
|
2012-11-21 21:57:26 +01:00
|
|
|
|
2012-11-26 18:44:31 +01:00
|
|
|
from re import compile
|
2012-10-11 12:03:12 +02:00
|
|
|
from ..scraper import _BasicScraper
|
2012-11-26 07:13:32 +01:00
|
|
|
from ..util import tagre
|
2012-06-20 21:58:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
class YAFGC(_BasicScraper):
|
2013-04-14 09:02:14 +02:00
|
|
|
description = u'Yet Another Fantasy Gamer Comic'
|
2013-02-04 21:00:26 +01:00
|
|
|
url = 'http://yafgc.net/'
|
|
|
|
stripUrl = url + '?id=%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2013-03-19 20:45:18 +01: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 07:13:32 +01:00
|
|
|
tagre("img", "src", r'/img/navbar/go_to_previous\.gif'))
|
2013-03-19 20:45:18 +01:00
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
def prevUrlModifier(cls, prevUrl):
|
|
|
|
if prevUrl:
|
|
|
|
return prevUrl.replace("www.yafgc.net", "yafgc.net")
|