2020-04-18 13:45:44 +02:00
|
|
|
# SPDX-License-Identifier: MIT
|
2016-10-29 00:21:41 +02:00
|
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 16:50:57 +01:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2020-01-09 17:38:13 +01:00
|
|
|
# Copyright (C) 2015-2020 Tobias Gruetzmacher
|
2020-01-12 22:34:05 -08:00
|
|
|
# Copyright (C) 2019-2020 Daniel Ring
|
2020-01-09 17:38:13 +01:00
|
|
|
from re import compile, escape
|
2012-06-20 21:58:13 +02:00
|
|
|
|
2012-10-11 12:03:12 +02:00
|
|
|
from ..util import tagre
|
2015-05-31 23:16:12 +12:00
|
|
|
from ..scraper import _BasicScraper, _ParserScraper
|
2020-07-31 22:56:30 +02:00
|
|
|
from ..helpers import indirectStarter, joinPathPartsNamer
|
2019-10-26 01:39:03 -07:00
|
|
|
from .common import _ComicControlScraper, _WPNaviIn, _WordPressScraper
|
2012-06-20 21:58:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
class FalconTwin(_BasicScraper):
|
2013-02-04 21:00:26 +01:00
|
|
|
url = 'http://www.falcontwin.com/'
|
|
|
|
stripUrl = url + 'index.html?strip=%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '0'
|
2012-06-20 21:58:13 +02:00
|
|
|
imageSearch = compile(r'"(strips/.+?)"')
|
|
|
|
prevSearch = compile(r'"prev"><a href="(index.+?)"')
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
2016-05-02 01:25:34 +02:00
|
|
|
class Faneurysm(_WPNaviIn):
|
|
|
|
url = 'http://hijinksensue.com/comic/think-only-tree/'
|
|
|
|
firstStripUrl = 'http://hijinksensue.com/comic/captains-prerogative/'
|
|
|
|
endOfLife = True
|
|
|
|
|
|
|
|
|
2020-01-09 17:38:13 +01:00
|
|
|
class FantasyRealms(_ParserScraper):
|
|
|
|
stripUrl = ('https://web.archive.org/web/20161204192651/'
|
|
|
|
'http://fantasyrealmsonline.com/manga/%s.php')
|
|
|
|
url = stripUrl % '091'
|
|
|
|
firstStripUrl = stripUrl % '001'
|
|
|
|
imageSearch = '//img[contains(@src, "/manga/0")]'
|
|
|
|
prevSearch = '//a[img[contains(@src, "nav-back")]]'
|
|
|
|
endOfLife = True
|
2013-03-06 20:21:10 +01:00
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
2019-10-26 01:39:03 -07:00
|
|
|
class FarToTheNorth(_ComicControlScraper):
|
|
|
|
url = 'http://www.farnorthcomic.com/'
|
|
|
|
stripUrl = url + 'comic/%s'
|
|
|
|
firstStripUrl = stripUrl % 'don39t-tell'
|
|
|
|
|
|
|
|
|
2016-09-30 00:15:45 +02:00
|
|
|
class FauxPas(_ParserScraper):
|
2013-02-04 21:00:26 +01:00
|
|
|
url = 'http://www.ozfoxes.net/cgi/pl-fp1.cgi'
|
|
|
|
stripUrl = url + '?%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2016-09-30 00:15:45 +02:00
|
|
|
imageSearch = '//img[@name]'
|
|
|
|
prevSearch = '//a[img[@alt="Previous"]]'
|
2012-06-20 21:58:13 +02:00
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
2016-05-02 22:32:14 +02:00
|
|
|
class FireflyCross(_WordPressScraper):
|
|
|
|
url = 'http://www.fireflycross.pensandtales.com/'
|
|
|
|
firstStripUrl = url + '?comic=05062002'
|
|
|
|
|
|
|
|
|
2020-01-09 17:38:13 +01:00
|
|
|
class FirstWorldProblems(_ParserScraper):
|
|
|
|
url = ('https://web.archive.org/web/20150710053456/'
|
|
|
|
'http://bradcolbow.com/archive/C5/')
|
2013-03-06 20:00:30 +01:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % 'P10'
|
2020-07-31 22:56:30 +02:00
|
|
|
imageSearch = '//div[d:class("entry")]//img'
|
|
|
|
prevSearch = '//a[d:class("prev")]'
|
2013-02-06 22:27:40 +01:00
|
|
|
multipleImagesPerStrip = True
|
2020-01-09 17:38:13 +01:00
|
|
|
endOfLife = True
|
2013-02-06 22:27:40 +01:00
|
|
|
|
|
|
|
|
2012-06-20 21:58:13 +02:00
|
|
|
class FlakyPastry(_BasicScraper):
|
2013-04-13 20:58:00 +02:00
|
|
|
baseUrl = 'http://flakypastry.runningwithpencils.com/'
|
|
|
|
url = baseUrl + 'index.php'
|
|
|
|
stripUrl = baseUrl + 'comic.php?strip_id=%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '0'
|
2012-06-20 21:58:13 +02:00
|
|
|
imageSearch = compile(r'<img src="(comics/.+?)"')
|
|
|
|
prevSearch = compile(r'<a href="(.+?)".+?btn_back')
|
|
|
|
help = 'Index format: nnnn'
|
|
|
|
|
2012-12-04 07:02:40 +01:00
|
|
|
|
2020-01-09 17:38:13 +01:00
|
|
|
class Flemcomics(_ParserScraper):
|
|
|
|
url = ('https://web.archive.org/web/20180414110349/'
|
|
|
|
'http://www.flemcomics.com/')
|
2013-02-04 21:00:26 +01:00
|
|
|
stripUrl = url + 'd/%s.html'
|
2020-01-09 17:38:13 +01:00
|
|
|
firstStripUrl = stripUrl % '19980101'
|
2020-07-31 22:56:30 +02:00
|
|
|
imageSearch = '//img[d:class("ksc")]'
|
2020-01-09 17:38:13 +01:00
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
endOfLife = True
|
2012-12-08 21:30:51 +01:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2019-07-04 20:04:27 -07:00
|
|
|
class Flipside(_ParserScraper):
|
2013-02-04 21:00:26 +01:00
|
|
|
url = 'http://flipside.keenspot.com/comic.php'
|
|
|
|
stripUrl = url + '?i=%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2019-07-04 20:04:27 -07:00
|
|
|
imageSearch = '//img[contains(@src, "comic/")]'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
2020-04-19 01:50:00 -07:00
|
|
|
adult = True
|
2012-06-20 21:58:13 +02:00
|
|
|
help = 'Index format: nnnn'
|
|
|
|
|
|
|
|
|
2016-05-07 01:50:10 +02:00
|
|
|
class FonFlatter(_ParserScraper):
|
2016-05-16 23:16:29 +02:00
|
|
|
url = 'https://www.fonflatter.de/'
|
2013-03-12 20:49:46 +01:00
|
|
|
stripUrl = url + '%s/'
|
2016-05-16 23:16:29 +02:00
|
|
|
firstStripUrl = url + '2005/09/20/01-begegnung-mit-batman/'
|
2013-03-12 20:49:46 +01:00
|
|
|
lang = 'de'
|
2016-05-07 01:50:10 +02:00
|
|
|
imageSearch = r'//img[re:test(@src, "/fred_\d+")]'
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
2013-03-12 20:49:46 +01:00
|
|
|
help = 'Index format: yyyy/mm/dd/number-stripname'
|
|
|
|
|
2014-02-10 21:58:09 +01:00
|
|
|
def shouldSkipUrl(self, url, data):
|
2013-03-13 18:31:58 +01:00
|
|
|
return url in (
|
2013-04-10 18:19:11 +02:00
|
|
|
self.stripUrl % "2006/11/30/adventskalender",
|
|
|
|
self.stripUrl % "2006/09/21/danke",
|
|
|
|
self.stripUrl % "2006/08/23/zgf-zuweilen-gestellte-fragen",
|
|
|
|
self.stripUrl % "2005/10/19/naq-never-asked-questions",
|
2016-04-02 00:14:31 +02:00
|
|
|
)
|
2013-03-13 18:31:58 +01:00
|
|
|
|
2013-03-12 20:49:46 +01:00
|
|
|
|
2019-12-26 22:03:18 +01:00
|
|
|
class ForestHill(_WordPressScraper):
|
|
|
|
url = 'https://www.foresthillcomic.org/'
|
|
|
|
|
|
|
|
|
2013-04-10 18:20:39 +02:00
|
|
|
class ForLackOfABetterComic(_BasicScraper):
|
|
|
|
url = 'http://forlackofabettercomic.com/'
|
2013-11-27 20:49:35 +01:00
|
|
|
rurl = r'http://(?:www\.)?forlackofabettercomic\.com/'
|
2013-04-10 18:20:39 +02:00
|
|
|
stripUrl = url + '?id=%s'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%simg/comic/\d+[^"]+)' % rurl, after="comicimg"))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s\?id\=\d+)' % rurl) + r'Prev')
|
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2019-08-17 15:33:50 -07:00
|
|
|
class FoxDad(_ParserScraper):
|
|
|
|
url = 'https://foxdad.com/'
|
|
|
|
stripUrl = url + 'post/%s'
|
|
|
|
firstStripUrl = stripUrl % '149683014997/some-people-are-just-different-support-the-comic'
|
|
|
|
imageSearch = '//figure[@class="photo-hires-item"]//img'
|
|
|
|
prevSearch = '//a[@class="previous-button"]'
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
page = self.getPage(pageUrl)
|
|
|
|
post = page.xpath('//link[@type="application/json+oembed"]')[0].get('href')
|
|
|
|
post = post.replace('https://www.tumblr.com/oembed/1.0?url=https://foxdad.com/post', '')
|
|
|
|
post = post.replace('-support-me-on-patreon', '')
|
|
|
|
return post.replace('/', '-')
|
|
|
|
|
|
|
|
|
2019-07-03 00:14:22 -07:00
|
|
|
class FoxTails(_ParserScraper):
|
|
|
|
stripUrl = 'http://foxtails.magickitsune.com/strips/%s.html'
|
|
|
|
url = stripUrl % 'current'
|
|
|
|
firstStripUrl = stripUrl % '20041024'
|
|
|
|
imageSearch = '//img[contains(@src, "img/2")]'
|
|
|
|
prevSearch = '//a[./img[contains(@src, "prev")]]'
|
|
|
|
endOfLife = True
|
|
|
|
|
|
|
|
def getPrevUrl(self, url, data):
|
|
|
|
# Include pre-reboot archive
|
|
|
|
if url == self.stripUrl % '20090906':
|
|
|
|
return self.stripUrl % '20090704'
|
|
|
|
return super(FoxTails, self).getPrevUrl(url, data)
|
|
|
|
|
|
|
|
|
2015-08-07 23:37:10 +12:00
|
|
|
class Fragile(_ParserScraper):
|
2020-01-09 17:38:13 +01:00
|
|
|
url = ('https://web.archive.org/web/20190308203109/'
|
|
|
|
'http://www.fragilestory.com/')
|
2016-01-03 14:08:49 +13:00
|
|
|
imageSearch = '//div[@id="comic_strip"]/a[@class="nobg"]/img'
|
|
|
|
prevSearch = '//div[@id="nav_comic_a"]/a[2]'
|
|
|
|
firstStripUrl = url + 'strips/chapter_01'
|
2020-01-09 17:38:13 +01:00
|
|
|
endOfLife = True
|
2015-08-07 23:37:10 +12:00
|
|
|
|
|
|
|
|
2016-09-30 00:15:45 +02:00
|
|
|
class FredoAndPidjin(_ParserScraper):
|
2019-12-31 01:44:19 +01:00
|
|
|
url = 'https://www.pidjin.net/'
|
2013-04-10 23:57:09 +02:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2006/02/19/goofy-monday'
|
2020-07-31 22:56:30 +02:00
|
|
|
imageSearch = '//div[d:class("episode")]//img'
|
2012-12-04 07:02:40 +01:00
|
|
|
multipleImagesPerStrip = True
|
2020-07-31 22:56:30 +02:00
|
|
|
prevSearch = '//span[d:class("prev")]/a'
|
|
|
|
latestSearch = '//section[d:class("latest")]//a'
|
2016-04-13 20:01:51 +02:00
|
|
|
starter = indirectStarter
|
2019-06-30 20:52:15 +02:00
|
|
|
namer = joinPathPartsNamer((0, 1, 2))
|
2013-03-11 22:45:30 +01:00
|
|
|
|
2019-11-04 00:16:25 +01:00
|
|
|
|
2019-07-16 23:11:27 -07:00
|
|
|
class Freefall(_ParserScraper):
|
|
|
|
url = 'http://freefall.purrsia.com/'
|
|
|
|
stripUrl = url + 'ff%d/%s%05d.htm'
|
|
|
|
firstStripUrl = stripUrl % (100, 'fv', 1)
|
|
|
|
imageSearch = '//img[contains(@src, "/ff")]'
|
|
|
|
prevSearch = '//a[text()="Previous"]'
|
|
|
|
multipleImagesPerStrip = True
|
|
|
|
|
|
|
|
def getIndexStripUrl(self, index):
|
|
|
|
# Get comic strip URL from index
|
|
|
|
index = int(index)
|
|
|
|
chapter = index + 100 - (index % 100)
|
|
|
|
color = 'fc' if index > 1252 else 'fv'
|
|
|
|
return self.stripUrl % (chapter, color, index)
|
2016-03-31 23:13:54 +02:00
|
|
|
|
|
|
|
|
2019-07-05 23:21:18 -07:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2020-03-06 18:06:30 -08:00
|
|
|
class FriendsYouAreStuckWith(_WordPressScraper):
|
|
|
|
url = 'http://friendsyasw.com/'
|
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'wanted'
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
page = self.getPage(pageUrl)
|
|
|
|
strip = page.xpath('//div[@id="comic-wrap"]/@class')[0].replace('comic-id-', '')
|
|
|
|
return strip + '_' + imageUrl.rstrip('/').rsplit('/', 1)[-1]
|
|
|
|
|
|
|
|
|
2013-03-11 22:45:30 +01:00
|
|
|
class FullFrontalNerdity(_BasicScraper):
|
|
|
|
url = 'http://ffn.nodwick.com/'
|
2013-04-10 18:19:11 +02:00
|
|
|
rurl = escape(url)
|
2013-03-11 22:45:30 +01:00
|
|
|
stripUrl = url + '?p=%s'
|
|
|
|
firstStripUrl = stripUrl % '6'
|
2013-04-10 18:19:11 +02:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%sffnstrips/\d+-\d+-\d+\.[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s\?p=\d+)' % rurl, after="prev"))
|
2013-03-11 22:45:30 +01:00
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2020-01-09 17:38:13 +01:00
|
|
|
class FunInJammies(_WordPressScraper):
|
|
|
|
url = ('https://web.archive.org/web/20170205105241/'
|
2020-01-12 22:36:24 +01:00
|
|
|
'http://funinjammies.com/')
|
2013-03-11 22:45:30 +01:00
|
|
|
stripUrl = url + 'comic.php?issue=%s'
|
2013-04-10 23:57:09 +02:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2020-01-09 17:38:13 +01:00
|
|
|
prevSearch = '//a[text()="< Prev"]'
|
|
|
|
endOfLife = True
|
2013-03-11 22:45:30 +01:00
|
|
|
help = 'Index format: n (unpadded)'
|
2019-07-12 01:40:57 -07:00
|
|
|
|
|
|
|
|
2019-08-24 20:56:41 -07:00
|
|
|
class FurPiled(_ParserScraper):
|
2020-01-09 17:38:13 +01:00
|
|
|
stripUrl = ('https://web.archive.org/web/20160404074145/'
|
|
|
|
'http://www.liondogworks.com/images/fp-%03d.jpg')
|
2019-08-24 20:56:41 -07:00
|
|
|
url = stripUrl % 427
|
|
|
|
firstStripUrl = stripUrl % 1
|
2020-01-09 17:38:13 +01:00
|
|
|
endOfLife = True
|
2019-08-24 20:56:41 -07:00
|
|
|
|
|
|
|
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]
|
|
|
|
|
|
|
|
|
2019-07-12 01:40:57 -07:00
|
|
|
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
|