2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2023-06-10 13:05:57 +00:00
|
|
|
# SPDX-FileCopyrightText: © 2004 Tristan Seligmann and Jonathan Jacobs
|
|
|
|
# SPDX-FileCopyrightText: © 2012 Bastian Kleineidam
|
|
|
|
# SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
|
|
|
|
# SPDX-FileCopyrightText: © 2019 Daniel Ring
|
2023-08-27 00:23:16 +00:00
|
|
|
from ..scraper import ParserScraper, _ParserScraper
|
2019-07-14 09:09:20 +00:00
|
|
|
from ..helpers import bounceStarter, indirectStarter
|
2024-02-14 22:51:30 +00:00
|
|
|
from .common import ComicControlScraper, WordPressScraper
|
2013-04-25 19:06:12 +00:00
|
|
|
|
|
|
|
|
2023-04-11 07:10:11 +00:00
|
|
|
class Lancer(WordPressScraper):
|
|
|
|
url = 'https://lancercomic.com/'
|
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'chapter-1-cover'
|
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class LastResort(WordPressScraper):
|
2019-06-23 09:10:24 +00:00
|
|
|
url = 'http://www.lastres0rt.com/'
|
|
|
|
stripUrl = url + 'comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % 'that-sound-you-hear-is-a-shattered-stereotype'
|
|
|
|
|
|
|
|
|
2020-04-16 09:03:04 +00:00
|
|
|
class LazJonesAndTheMayfieldRegulators(_ParserScraper):
|
2020-08-01 02:32:57 +00:00
|
|
|
baseUrl = 'https://www.lazjones.com/'
|
|
|
|
url = baseUrl + 'regulators'
|
|
|
|
stripUrl = baseUrl + 'comic/%s'
|
2020-04-16 09:03:04 +00:00
|
|
|
firstStripUrl = stripUrl % 'chapter1_00'
|
|
|
|
imageSearch = '//img[contains(@src, "comic/pages/")]'
|
|
|
|
prevSearch = '//a[contains(text(), "Previous")]'
|
|
|
|
|
|
|
|
|
2020-08-01 02:32:57 +00:00
|
|
|
class LazJonesAndTheMayfieldRegulatorsSideStories(LazJonesAndTheMayfieldRegulators):
|
|
|
|
name = 'LazJonesAndTheMayfieldRegulators/SideStories'
|
|
|
|
baseUrl = 'https://www.lazjones.com/'
|
2021-01-30 09:58:16 +00:00
|
|
|
url = baseUrl + 'comics'
|
2020-08-01 02:32:57 +00:00
|
|
|
stripUrl = baseUrl + 'comic/%s'
|
|
|
|
firstStripUrl = stripUrl % 'journal01'
|
|
|
|
|
2021-01-30 09:58:16 +00:00
|
|
|
def getPrevUrl(self, url, data):
|
|
|
|
# Fix broken navigation links
|
2024-03-17 20:44:46 +00:00
|
|
|
if url == self.url and self.match(data, self.prevSearch + '/@href')[0] == self.stripUrl % 'summer00':
|
2021-01-30 09:58:16 +00:00
|
|
|
return self.stripUrl % 'summer21'
|
|
|
|
return super(LazJonesAndTheMayfieldRegulators, self).getPrevUrl(url, data)
|
|
|
|
|
2020-08-01 02:32:57 +00:00
|
|
|
|
2022-12-27 22:06:27 +00:00
|
|
|
class LeastICouldDo(ParserScraper):
|
2019-12-31 00:44:19 +00:00
|
|
|
url = 'https://leasticoulddo.com/'
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + 'comic/%s'
|
2017-12-14 23:00:25 +00:00
|
|
|
firstStripUrl = stripUrl % '20030210'
|
2023-04-10 19:30:35 +00:00
|
|
|
imageSearch = '//img[d:class("comic")]'
|
2017-12-14 23:00:25 +00:00
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
latestSearch = '//a[@id="latest-comic"]'
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = indirectStarter
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2024-08-20 04:15:01 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class LetsSpeakEnglish(ComicControlScraper):
|
2016-04-03 22:12:53 +00:00
|
|
|
url = 'http://www.marycagle.com'
|
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class LifeAintNoPonyFarm(WordPressScraper):
|
2020-01-09 16:38:13 +00:00
|
|
|
url = ('https://web.archive.org/web/20181221154155/'
|
|
|
|
'http://sarahburrini.com/en/')
|
2018-04-21 00:25:11 +00:00
|
|
|
firstStripUrl = url + 'comic/my-first-webcomic/'
|
|
|
|
multipleImagesPerStrip = True
|
2020-01-09 16:38:13 +00:00
|
|
|
endOfLife = True
|
2018-04-21 00:25:11 +00:00
|
|
|
|
|
|
|
|
2023-06-10 13:05:57 +00:00
|
|
|
class LifeAsRendered(ParserScraper):
|
2019-06-28 04:43:37 +00:00
|
|
|
# Reverse navigation doesn't work properly, so search forward instead
|
|
|
|
stripUrl = 'https://kittyredden.com/LAR/%s/'
|
|
|
|
url = stripUrl % '0100'
|
|
|
|
firstStripUrl = stripUrl % '05extra'
|
|
|
|
imageSearch = '//figure[@class="wp-block-image"]//img'
|
|
|
|
prevSearch = '//a[img[@alt="Next"]]'
|
|
|
|
textSearch = '//div[@class="entry-content"]//text()'
|
|
|
|
adult = True
|
|
|
|
endOfLife = True
|
|
|
|
nav = {
|
|
|
|
'0140': '0200',
|
|
|
|
'0272': '02ss00',
|
|
|
|
'02SS14': '0300',
|
|
|
|
'0367': '03ss00',
|
|
|
|
'03ss10': '0400',
|
|
|
|
'0408': '0409',
|
|
|
|
'0409': '0410',
|
|
|
|
'0421': '0422',
|
|
|
|
'0449': '0450',
|
|
|
|
'0458': '0460',
|
|
|
|
'0460': '04ss00',
|
|
|
|
'04ss00': '04ss01',
|
|
|
|
'04ss10': '0500',
|
|
|
|
'0500': '0501',
|
|
|
|
'0508': '0509',
|
|
|
|
'0558': '0559',
|
2020-10-11 18:15:27 +00:00
|
|
|
'0577': '05extra',
|
2019-06-28 04:43:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
# Fix inconsistent filenames
|
|
|
|
filename = imageUrl.rsplit('/', 1)[-1]
|
2020-10-11 18:15:27 +00:00
|
|
|
return filename.replace('ReN', 'N').replace('N01P', 'A02S')
|
2019-06-28 04:43:37 +00:00
|
|
|
|
2023-06-10 13:05:57 +00:00
|
|
|
def extract_image_urls(self, url, data):
|
2019-06-28 04:43:37 +00:00
|
|
|
# Fix missing image link
|
2023-06-10 13:05:57 +00:00
|
|
|
if 'LAR/0403' in url:
|
2019-06-28 04:43:37 +00:00
|
|
|
return [self.stripUrl.rstrip('/') % 'A04/A04P03.png']
|
2023-06-10 13:05:57 +00:00
|
|
|
return super().extract_image_urls(url, data)
|
2019-06-28 04:43:37 +00:00
|
|
|
|
|
|
|
def getPrevUrl(self, url, data):
|
|
|
|
# Fix broken navigation links
|
|
|
|
page = url.rstrip('/').rsplit('/', 1)[-1]
|
2020-06-21 06:10:40 +00:00
|
|
|
if page in self.nav:
|
2019-06-28 04:43:37 +00:00
|
|
|
return self.stripUrl % self.nav[page]
|
|
|
|
return super(LifeAsRendered, self).getPrevUrl(url, data)
|
|
|
|
|
|
|
|
def fetchText(self, url, data, textSearch, optional):
|
|
|
|
# Save final summary text
|
|
|
|
if url == self.firstStripUrl:
|
|
|
|
url = self.stripUrl % 'the-end'
|
|
|
|
data = self.getPage(url)
|
|
|
|
return super(LifeAsRendered, self).fetchText(url, data, textSearch, optional)
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class LilithsWord(ComicControlScraper):
|
2019-10-26 09:02:52 +00:00
|
|
|
url = 'http://www.lilithword.com/'
|
|
|
|
stripUrl = url + 'comic/%s'
|
|
|
|
firstStripUrl = stripUrl % 'prologue-page-00'
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
return imageUrl.rsplit('/', 1)[-1].split('-', 1)[1]
|
|
|
|
|
|
|
|
|
2023-08-27 00:23:16 +00:00
|
|
|
class LittleGamers(ParserScraper):
|
|
|
|
url = 'https://www.little-gamers.com/'
|
|
|
|
firstStripUrl = url + '2000/12/01/99'
|
|
|
|
imageSearch = '//div[d:class("comic")]//img'
|
|
|
|
prevSearch = ('//a[@id="previous"]',
|
|
|
|
'//div[d:class("comic-navigation")]//a[text()="previous"]')
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2019-07-06 18:23:09 +00:00
|
|
|
class LittleTales(_ParserScraper):
|
|
|
|
url = 'http://www.little-tales.com/'
|
|
|
|
stripUrl = url + 'index.php?Strip=%s'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
url = stripUrl % '450'
|
|
|
|
imageSearch = '//img[contains(@src, "strips/")]'
|
|
|
|
prevSearch = '//a[./img[@alt="BACK"]]'
|
|
|
|
nextSearch = '//a[./img[@alt="FORWARD"]]'
|
|
|
|
starter = bounceStarter
|
|
|
|
nav = {
|
|
|
|
'517': '515',
|
2020-10-11 18:15:27 +00:00
|
|
|
'449': '447',
|
2019-07-06 18:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
page = pageUrl.rsplit('=', 1)[-1]
|
|
|
|
ext = imageUrl.rsplit('.', 1)[-1]
|
|
|
|
return page + '.' + ext
|
|
|
|
|
|
|
|
def getPrevUrl(self, url, data):
|
|
|
|
# Skip missing pages with broken navigation links
|
|
|
|
page = url.rsplit('=', 1)[1]
|
|
|
|
if page in self.nav:
|
|
|
|
return self.stripUrl % self.nav[page]
|
|
|
|
return super(LittleTales, self).getPrevUrl(url, data)
|
|
|
|
|
|
|
|
|
2015-05-31 23:33:50 +00:00
|
|
|
class LoadingArtist(_ParserScraper):
|
2022-06-06 11:34:27 +00:00
|
|
|
url = 'https://loadingartist.com/'
|
|
|
|
firstStripUrl = url + 'comic/born/'
|
|
|
|
imageSearch = '//div[d:class("main-image-container")]//img'
|
|
|
|
prevSearch = '//div[d:class("left-nav")]//a'
|
|
|
|
latestSearch = '//nav//a[text()="Comic"]'
|
|
|
|
starter = indirectStarter
|
2013-03-06 19:00:30 +00:00
|
|
|
|
2016-04-03 20:58:01 +00:00
|
|
|
|
2023-08-27 00:23:16 +00:00
|
|
|
class LoFiJinks(WordPressScraper):
|
2020-10-11 18:15:27 +00:00
|
|
|
baseUrl = 'https://hijinksensue.com/comic/'
|
|
|
|
url = baseUrl + 'learning-to-love-again/'
|
|
|
|
firstStripUrl = baseUrl + 'lo-fijinks-everything-i-know-anout-james-camerons-avatar-movie/'
|
2016-05-01 23:25:34 +00:00
|
|
|
endOfLife = True
|
|
|
|
|
|
|
|
|
2022-12-27 22:10:34 +00:00
|
|
|
class LookingForGroup(ParserScraper):
|
2019-07-14 09:09:20 +00:00
|
|
|
url = 'https://www.lfg.co/'
|
|
|
|
stripUrl = url + 'page/%s/'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2023-04-10 19:30:05 +00:00
|
|
|
imageSearch = '//div[@id="comic-img"]//img'
|
2022-12-27 22:10:34 +00:00
|
|
|
prevSearch = '//a[d:class("comic-nav-prev")]'
|
2019-07-14 09:09:20 +00:00
|
|
|
latestSearch = '//div[@id="feature-lfg-footer"]/a[contains(@href, "page/")]'
|
|
|
|
starter = indirectStarter
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: nnn'
|
2019-07-14 09:09:20 +00:00
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
page = pageUrl.rstrip('/').rsplit('/', 1)[-1]
|
|
|
|
return page.replace('2967', '647')
|