Compare commits
No commits in common. "067dba7c75fb99532f1c4082ed0f7c9c0f4c7acb" and "bf9e7d276072eff8a6fecaa0584c1d36246ad69d" have entirely different histories.
067dba7c75
...
bf9e7d2760
5 changed files with 42 additions and 66 deletions
|
@ -80,16 +80,6 @@ class AdventuresOfFifne(_ParserScraper):
|
||||||
return super(AdventuresOfFifne, self).getPrevUrl(url, data)
|
return super(AdventuresOfFifne, self).getPrevUrl(url, data)
|
||||||
|
|
||||||
|
|
||||||
class AfterlifeBlues(ParserScraper):
|
|
||||||
baseUrl = 'https://project-apollo.net/'
|
|
||||||
url = baseUrl + 'ab/ab213.html'
|
|
||||||
firstStripUrl = baseUrl + 'mos/ab000.html'
|
|
||||||
imageSearch = '//img[contains(@src, "manga/")]'
|
|
||||||
prevSearch = '//a[img/@alt="Previous Page"]'
|
|
||||||
nextSearch = '//a[img/@alt="Next Page"]'
|
|
||||||
endOfLife = True
|
|
||||||
|
|
||||||
|
|
||||||
class AfterStrife(WordPressNavi):
|
class AfterStrife(WordPressNavi):
|
||||||
baseUrl = 'http://afterstrife.com/'
|
baseUrl = 'http://afterstrife.com/'
|
||||||
stripUrl = baseUrl + '?p=%s'
|
stripUrl = baseUrl + '?p=%s'
|
||||||
|
@ -262,16 +252,6 @@ class AmbersNoBrainers(_ParserScraper):
|
||||||
return self.stripUrl % str(pageNum - 1)
|
return self.stripUrl % str(pageNum - 1)
|
||||||
|
|
||||||
|
|
||||||
class AMiracleOfScience(ParserScraper):
|
|
||||||
baseUrl = 'https://project-apollo.net/'
|
|
||||||
url = baseUrl + 'mos/mos435.html'
|
|
||||||
firstStripUrl = baseUrl + 'mos/mos000.html'
|
|
||||||
imageSearch = '//img[contains(@src, "manga/")]'
|
|
||||||
prevSearch = '//a[img/@alt="Previous Page"]'
|
|
||||||
nextSearch = '//a[img/@alt="Next Page"]'
|
|
||||||
endOfLife = True
|
|
||||||
|
|
||||||
|
|
||||||
class Amya(WordPressScraper):
|
class Amya(WordPressScraper):
|
||||||
url = 'http://www.amyachronicles.com/'
|
url = 'http://www.amyachronicles.com/'
|
||||||
|
|
||||||
|
|
|
@ -1,49 +1,55 @@
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# SPDX-FileCopyrightText: © 2019 Tobias Gruetzmacher
|
# SPDX-FileCopyrightText: © 2019 Tobias Gruetzmacher
|
||||||
# SPDX-FileCopyrightText: © 2019 Daniel Ring
|
# SPDX-FileCopyrightText: © 2019 Daniel Ring
|
||||||
import itertools
|
|
||||||
|
|
||||||
from ..scraper import ParserScraper
|
from ..scraper import ParserScraper
|
||||||
from ..helpers import indirectStarter, joinPathPartsNamer
|
from ..helpers import indirectStarter
|
||||||
|
|
||||||
|
|
||||||
class Derideal(ParserScraper):
|
class Derideal(ParserScraper):
|
||||||
baseUrl = 'https://derideal.com/'
|
baseUrl = 'https://www.derideal.com/'
|
||||||
imageSearch = '//img[d:class("comic-page") or d:class("comic-pag")]'
|
imageSearch = '//img[contains(@class, "comic-page")]'
|
||||||
prevSearch = '//a[text()="<"]'
|
prevSearch = '//a[i[contains(@class, "fa-angle-left")]]'
|
||||||
starter = indirectStarter
|
latestSearch = '//a[i[contains(@class, "fa-angle-double-right")]]'
|
||||||
namer = joinPathPartsNamer(imageparts=range(-3, 0))
|
|
||||||
|
|
||||||
def __init__(self, name, lang, sub, first, eol=False, multi=False):
|
def __init__(self, name, sub, first, last=None):
|
||||||
if lang == 'en':
|
if name == 'Derideal':
|
||||||
base = 'Derideal'
|
super().__init__(name)
|
||||||
lateststr = 'Read latest update'
|
|
||||||
else:
|
else:
|
||||||
base = 'DeridealSpanish'
|
super().__init__('Derideal/' + name)
|
||||||
sub = f'{lang}/{sub}'
|
|
||||||
lateststr = 'Leer última actualización'
|
|
||||||
|
|
||||||
if not name:
|
self.url = self.baseUrl + sub
|
||||||
super().__init__(base)
|
self.stripUrl = self.url + '/%s/'
|
||||||
else:
|
self.firstStripUrl = self.stripUrl % first
|
||||||
super().__init__(f'{base}/{name}')
|
self.startUrl = self.firstStripUrl
|
||||||
|
|
||||||
self.url = f'{self.baseUrl}{sub}'
|
if last:
|
||||||
self.firstStripUrl = f'{self.url}/{first}/'
|
self.endOfLife = True
|
||||||
self.latestSearch = f'//a[contains(text(), "{lateststr}")]'
|
|
||||||
self.lang = lang
|
def starter(self):
|
||||||
self.endOfLife = eol
|
indexPage = self.getPage(self.url)
|
||||||
self.multipleImagesPerStrip = multi
|
self.chapters = self.match(indexPage, '//a[contains(text(), "Read this episode")]/@href')
|
||||||
|
self.currentChapter = len(self.chapters)
|
||||||
|
return indirectStarter(self)
|
||||||
|
|
||||||
|
def namer(self, imageUrl, pageUrl):
|
||||||
|
filename = pageUrl.rstrip('/').rsplit('/', 1)[-1]
|
||||||
|
filename = filename.replace('espanol-escape-25', 'escape-26')
|
||||||
|
filename = filename.replace('espanol-w-a-l-l-y', 'w-a-l-l-y')
|
||||||
|
filename = filename.replace('hogar-prision', 'home-prison')
|
||||||
|
filename = filename.replace('strip', 'pe').replace('purpurina-effect', 'pe')
|
||||||
|
filename = filename.replace('sector-de-seguridad', 'security-sector')
|
||||||
|
filename = 'ch' + str(self.currentChapter) + '-' + filename
|
||||||
|
if pageUrl in self.chapters:
|
||||||
|
self.currentChapter -= 1
|
||||||
|
return filename
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls):
|
def getmodules(cls):
|
||||||
return itertools.chain.from_iterable((
|
return (
|
||||||
cls('', lang, 'derideal', 'chimeras-cover'),
|
cls('Derideal', 'derideal', 'cover-prime'),
|
||||||
cls('Legacy', lang, 'derideal-legacy', 'the-dream-cover', eol=True),
|
cls('Legacy', 'derideal-legacy', 'the-dream-cover', last='derideal-is-on-hiatus'),
|
||||||
cls('LostMemories', lang, 'lost-memories', 'lost-memories-pixi', multi=True),
|
cls('LRE', 'RLE', 'the-leyend-of-the-rose-cover'),
|
||||||
cls('Nova', lang, 'nova', 'xen-prelude-cover'),
|
cls('ProjectPrime', 'project-prime', 'custus-part-i-cover'),
|
||||||
cls('ProjectPrime', lang, 'project-prime', 'custus-part-i-cover'),
|
cls('PurpurinaEffect', 'purpurina-effect', 'purpurina-effect-cover'),
|
||||||
cls('PurpurinaEffect', lang, 'purpurina-effect', 'purpurina-effect-cover'),
|
cls('TheVoid', 'the-void', 'the-void-cover'),
|
||||||
cls('RLE', lang, 'RLE', 'the-leyend-of-the-rose-cover'),
|
)
|
||||||
cls('TheVoid', lang, 'the-void', 'the-void-cover'),
|
|
||||||
) for lang in ('en', 'es'))
|
|
||||||
|
|
|
@ -54,16 +54,6 @@ class LeastICouldDo(ParserScraper):
|
||||||
help = 'Index format: yyyymmdd'
|
help = 'Index format: yyyymmdd'
|
||||||
|
|
||||||
|
|
||||||
class LeifAndThorn(ParserScraper):
|
|
||||||
url = 'https://leifandthorn.com/'
|
|
||||||
stripUrl = url + 'comic/%s/'
|
|
||||||
firstStripUrl = stripUrl % 'magical-comic-lyrical-test-post'
|
|
||||||
imageSearch = '//img[d:class("attachment-full")]'
|
|
||||||
prevSearch = '//a[d:class("previous-webcomic-link")]'
|
|
||||||
nextSearch = '//a[d:class("next-webcomic-link")]'
|
|
||||||
starter = bounceStarter
|
|
||||||
|
|
||||||
|
|
||||||
class LetsSpeakEnglish(ComicControlScraper):
|
class LetsSpeakEnglish(ComicControlScraper):
|
||||||
url = 'http://www.marycagle.com'
|
url = 'http://www.marycagle.com'
|
||||||
|
|
||||||
|
|
|
@ -1748,7 +1748,6 @@ class Renamed(Scraper):
|
||||||
# Renamed in 3.1
|
# Renamed in 3.1
|
||||||
cls('ComicsKingdom/SlylockFoxAndComicsForKids', 'ComicsKingdom/SlylockFox'),
|
cls('ComicsKingdom/SlylockFoxAndComicsForKids', 'ComicsKingdom/SlylockFox'),
|
||||||
cls('ComicsKingdom/SlylockFoxAndComicsForKidsSpanish', 'ComicsKingdom/SlylockFoxSpanish'),
|
cls('ComicsKingdom/SlylockFoxAndComicsForKidsSpanish', 'ComicsKingdom/SlylockFoxSpanish'),
|
||||||
cls('Derideal/LRE', 'Derideal/RLE'),
|
|
||||||
cls('Exiern', 'ComicFury/Exiern'),
|
cls('Exiern', 'ComicFury/Exiern'),
|
||||||
cls('MaxOveracts', 'OccasionalComicsDisorder'),
|
cls('MaxOveracts', 'OccasionalComicsDisorder'),
|
||||||
cls('SafelyEndangered', 'WebToons/SafelyEndangered'),
|
cls('SafelyEndangered', 'WebToons/SafelyEndangered'),
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
pkgs.cowsay
|
||||||
pkgs.alejandra
|
pkgs.alejandra
|
||||||
pkgs.python310Full
|
pkgs.python310Full
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue