# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
from re import compile, IGNORECASE, MULTILINE
from ..util import tagre
from ..helpers import _BasicScraper, indirectStarter
class FalconTwin(_BasicScraper):
latestUrl = 'http://www.falcontwin.com/'
imageUrl = 'http://www.falcontwin.com/index.html?strip=%s'
imageSearch = compile(r'"(strips/.+?)"')
prevSearch = compile(r'"prev">Previous Strip')
help = 'Index format: nnn'
class FeyWinds(_BasicScraper):
imageUrl = 'http://kitsune.rydia.net/comic/page.php?id=%s'
imageSearch = compile(r"(../comic/pages//.+?)'")
prevSearch = compile(r"(page.php\?id=.+?)'.+?navprevious.png")
help = 'Index format: n (unpadded)'
starter = indirectStarter('http://kitsune.rydia.net/index.html',
compile(r'(comic/page.php\?id.+?)"'))
class FightCastOrEvade(_BasicScraper):
latestUrl = 'http://www.fightcastorevade.net/'
imageUrl = 'http://www.fightcastorevade.net/d/%s'
imageSearch = compile(r'<')
help = 'Index format: nnnn'
class Footloose(_BasicScraper):
latestUrl = 'http://footloosecomic.com/footloose/today.php'
imageUrl = 'http://footloosecomic.com/footloose/pages.php?page=%s'
imageSearch = compile(r']).+?(/footloose/.+?)".+?(?:prev)')
# prevSearch = compile(r'(?:first.+?[^>]).+?(/footloose/.+?html).+?(?:prev|Prev)')
help = 'Index format: n (unpadded)'
class FragileGravity(_BasicScraper):
latestUrl = 'http://www.fragilegravity.com/'
imageUrl = 'http://www.fragilegravity.com/core.php?archive=%s'
imageSearch = compile(r'Previous')
help = 'Index format: nnnn/nnnnn'
class FantasyRealms(_BasicScraper):
imageUrl = 'http://www.fantasyrealmsonline.com/manga/%s.php'
imageSearch = compile(r'Back', IGNORECASE)
help = 'Index format: nn-m (comicNumber-partNumber)'
starter = indirectStarter('http://www.fallencomic.com/fal-page.htm',
compile(r'\(NEW \d{2}/\d{2}/\d{2}\)\s*\n*\s*\d+', MULTILINE))
@classmethod
def namer(cls, imageUrl, pageUrl):
num = pageUrl.split('/')[-1].split('-')[0]
part = pageUrl.split('-')[-1].split('.')[0]
return '%s-%s' % (part, num)
def setStrip(self, index):
index, part = index.split('-')
self.currentUrl = self.imageUrl % (part, index, part)
class FoxTails(_BasicScraper):
latestUrl = 'http://www.magickitsune.com/strips/current.html'
imageUrl = 'http://www.magickitsune.com/strips/%s'
imageSearch = compile(r']', IGNORECASE)
prevSearch = compile(r'(?<=first.gif)*(?<=)*', IGNORECASE)
help = 'Index format: yyyymmdd'
class FredoAndPidjin(_BasicScraper):
homepage = 'http://www.pidjin.net/'
help = 'Index format: yyyy/mm/dd/name'
imageSearch = compile(tagre('img', 'src', '(http://cdn\.pidjin\.net/wp-content/uploads/\d\d\d\d/\d\d/\d+[^"]+\.png)'))
prevSearch = compile(tagre('a', 'href', '([^"]+)')+"Prev")
starter = indirectStarter(homepage,
compile(tagre('a', 'href', "("+homepage+r'\d\d\d\d/\d\d/\d\d/[^"]+/)')))