# -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2019 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from re import compile, escape, IGNORECASE from ..util import tagre from ..scraper import _BasicScraper, _ParserScraper from ..helpers import indirectStarter, joinPathPartsNamer, xpath_class from .common import _ComicControlScraper, _WPNaviIn, _WordPressScraper class FalconTwin(_BasicScraper): url = 'http://www.falcontwin.com/' stripUrl = url + 'index.html?strip=%s' firstStripUrl = stripUrl % '0' imageSearch = compile(r'"(strips/.+?)"') prevSearch = compile(r'"prev"> 1252 else 'fv' return self.stripUrl % (chapter, color, index) class FreighterTails(_ParserScraper): url = 'http://www.mzzkiti.com/' stripUrl = url + 'log%s.htm' firstStripUrl = stripUrl % '001' imageSearch = ('//img[contains(@src, "Strip")]', '//img[contains(@src, "Caption")]') prevSearch = '//a[./img[contains(@src, "prev")]]' endOfLife = True class FullFrontalNerdity(_BasicScraper): url = 'http://ffn.nodwick.com/' rurl = escape(url) stripUrl = url + '?p=%s' firstStripUrl = stripUrl % '6' imageSearch = compile(tagre("img", "src", r'(%sffnstrips/\d+-\d+-\d+\.[^"]+)' % rurl)) prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev")) help = 'Index format: number' class FunInJammies(_BasicScraper): url = 'http://www.funinjammies.com/' stripUrl = url + 'comic.php?issue=%s' firstStripUrl = stripUrl % '1' imageSearch = compile(r'(/comics/.+?)"') prevSearch = compile(r'(/comic.php.+?)" id.+?prev') help = 'Index format: n (unpadded)' class FurPiled(_ParserScraper): stripUrl = 'https://web.archive.org/web/20160404074145/http://www.liondogworks.com/images/fp-%03d.jpg' url = stripUrl % 427 firstStripUrl = stripUrl % 1 def getPrevUrl(self, url, data): # Skip missing pages nextStrip = int(url.rsplit('/', 1)[-1].split('.', 1)[0].replace('fp-', '')) - 1 if nextStrip in [407, 258, 131, 110, 97, 31]: nextStrip = nextStrip - 1 return self.stripUrl % nextStrip def fetchUrls(self, url, data, urlSearch): # URLs are direct links to images return [url] class FurthiaHigh(_ParserScraper): url = 'http://furthiahigh.concessioncomic.com/' stripUrl = url + 'index.php?pid=%s' firstStripUrl = stripUrl % '20080128' imageSearch = '//img[contains(@alt, "Comic")]' prevSearch = '//a[./img[@alt="Previous"]]' multipleImagesPerStrip = True