diff --git a/dosagelib/plugins/mangadex.py b/dosagelib/plugins/mangadex.py index 3ed0e35e0..ea943edd3 100644 --- a/dosagelib/plugins/mangadex.py +++ b/dosagelib/plugins/mangadex.py @@ -134,6 +134,7 @@ class MangaDex(_ParserScraper): cls('SenpaiGaUzaiKouhaiNoHanashi', 'af38f328-8df1-4b4c-a272-e737625c3ddc'), cls('SewayakiKitsuneNoSenkoSan', 'c26269c7-0f5d-4966-8cd5-b79acb86fb7a'), cls('ShinNoJitsuryokuWaGirigiriMadeKakushiteIyouToOmou', '22fda941-e603-4601-a536-c3ad6d004ba8'), + cls('SoloLeveling', '32d76d19-8a05-4db0-9fc2-e0b0648fe9d0'), cls('SousouNoFrieren', 'b0b721ff-c388-4486-aa0f-c2b0bb321512'), cls('SwordArtOnline', '3dd0b814-23f4-4342-b75b-f206598534f6'), cls('SwordArtOnlineProgressive', '22ea3f54-11e4-4932-a527-89d63d3a62d9'), diff --git a/dosagelib/plugins/old.py b/dosagelib/plugins/old.py index 91e958509..da12ea04d 100644 --- a/dosagelib/plugins/old.py +++ b/dosagelib/plugins/old.py @@ -1627,6 +1627,7 @@ class Renamed(Scraper): cls('SmackJeeves/FurryExperience', 'ComicFury/FurryExperience'), cls('SmackJeeves/GrowingTroubles', 'ComicFury/GrowingTroubles'), cls('SmackJeeves/TheRealmOfKaerwyn', 'ComicFury/TheRealmOfKaerwyn'), + cls('SoloLeveling', 'MangaDex/SoloLeveling'), cls('StudioKhimera/Draconia', 'Draconia'), cls('TracesOfThePast', 'RickGriffinStudios/TracesOfThePast'), cls('TracesOfThePast/NSFW', 'RickGriffinStudios/TracesOfThePastNSFW'), diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py index af9051f52..a543977dd 100644 --- a/dosagelib/plugins/s.py +++ b/dosagelib/plugins/s.py @@ -355,66 +355,6 @@ class SodiumEyes(_WordPressScraper): endOfLife = True -class SoloLeveling(_ParserScraper): - url = 'https://w3.sololeveling.net/' - stripUrl = url + 'manga/solo-leveling-chapter-%s/' - firstStripUrl = stripUrl % '1' - imageSearch = '//div[@class="img_container"]//img' - prevSearch = '//a[@rel="prev"]' - latestSearch = '//div[@id="latestChapters"]//a' - starter = indirectStarter - multipleImagesPerStrip = True - imageUrlFixes = { - '94-0_5dd574efda419/28.': '94-0_5dd574efda419/28a.', - '92-0_5dc2fcb9ed562/22.': '92-0_5dc2fcb9ed562/22s.', - '91-0_5db9b881ac2f0/20k.': '91-0_5db9b881ac2f0/20l.', - '91-0_5db9b881ac2f0/23.': '91-0_5db9b881ac2f0/23a.', - '90-0_5db08467ca2b1/07.': '90-0_5db08467ca2b1/07a.', - '90-0_5db08467ca2b1/09.': '90-0_5db08467ca2b1/09a.', - '90-0_5db08467ca2b1/13.': '90-0_5db08467ca2b1/13a.', - '90-0_5db08467ca2b1/14.': '90-0_5db08467ca2b1/14a.', - '90-0_5db08467ca2b1/21.': '90-0_5db08467ca2b1/21a.', - '90-0_5db08467ca2b1/22.': '90-0_5db08467ca2b1/22a.', - '88-0_5d9e0dedb942e/03.': '88-0_5d9e0dedb942e/03b.', - '88-0_5d9e0dedb942e/05.': '88-0_5d9e0dedb942e/05a.', - '88-0_5d9e0dedb942e/30.': '88-0_5d9e0dedb942e/30a.', - '87-0_5d94cdebd9df7/01a.': '87-0_5d94cdebd9df7/01c.', - } - - def imageUrlModifier(self, imageUrl, data): - if 'url=' in imageUrl: - imageUrl = imageUrl.split('url=')[1].split('&')[0] - for fix in self.imageUrlFixes: - imageUrl = imageUrl.replace(fix, self.imageUrlFixes[fix]) - return imageUrl - - def fetchUrls(self, url, data, urlSearch): - # Save link order for position-based filenames - self.imageUrls = super(SoloLeveling, self).fetchUrls(url, data, urlSearch) - self.imageUrls = [self.imageUrlModifier(x, data) for x in self.imageUrls] - return self.imageUrls - - def getPage(self, url): - try: - return super().getPage(url) - except HTTPError as e: - # CloudFlare WAF - if e.response.status_code == 403 and '1020' in e.response.text: - self.geoblocked() - else: - raise e - - def getPrevUrl(self, url, data): - return self.stripUrl % str(int(url.strip('/').rsplit('-', 1)[-1]) - 1) - - def namer(self, imageUrl, pageUrl): - # Construct filename from episode number and image position on page - episodeNum = pageUrl.strip('/').rsplit('-', 1)[-1] - imageNum = self.imageUrls.index(imageUrl) - imageExt = imageUrl.rsplit('.', 1)[-1] - return "%s-%03d.%s" % (episodeNum, imageNum, imageExt) - - class SomethingPositive(_ParserScraper): url = 'https://www.somethingpositive.net/' stripUrl = url + 'sp%s.shtml'