mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-14 04:13:18 +02:00
Fix MangaDex Downloads: Get Chapter-Id from URL
This commit is contained in:
parent
68cc23e158
commit
d257095885
@ -256,8 +256,11 @@ public class MangaDex : MangaConnector
|
||||
|
||||
internal override string[] GetChapterImageUrls(Chapter chapter)
|
||||
{//Request URLs for Chapter-Images
|
||||
Match m = Regex.Match(chapter.Url, @"https?:\/\/mangadex.org\/chapter\/([0-9\-a-z]+)");
|
||||
if (!m.Success)
|
||||
return [];
|
||||
RequestResult requestResult =
|
||||
downloadClient.MakeRequest($"https://api.mangadex.org/at-home/server/{chapter.ChapterId}?forcePort443=false", RequestType.MangaDexImage);
|
||||
downloadClient.MakeRequest($"https://api.mangadex.org/at-home/server/{m.Groups[1].Value}?forcePort443=false", RequestType.MangaDexImage);
|
||||
if ((int)requestResult.statusCode < 200 || (int)requestResult.statusCode >= 300)
|
||||
{
|
||||
return [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user