mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-08 16:12:10 +02:00
Compare commits
2 Commits
e6d40a7b36
...
9cef068785
Author | SHA1 | Date | |
---|---|---|---|
9cef068785 | |||
![]() |
4ad3149523 |
@ -154,15 +154,16 @@ public class Webtoons : MangaConnector
|
|||||||
return Array.Empty<Chapter>();
|
return Array.Empty<Chapter>();
|
||||||
|
|
||||||
// Get number of pages
|
// Get number of pages
|
||||||
int pages = requestResult.htmlDocument.DocumentNode.SelectSingleNode("//div[contains(@class, 'paginate')]").ChildNodes.ToArray().Length;
|
int pages = requestResult.htmlDocument.DocumentNode
|
||||||
|
.SelectNodes("//div[contains(@class, 'paginate')]/a")
|
||||||
|
.ToList()
|
||||||
|
.Count;
|
||||||
List<Chapter> chapters = new List<Chapter>();
|
List<Chapter> chapters = new List<Chapter>();
|
||||||
|
|
||||||
for(int page = 1; page <= pages; page++) {
|
for(int page = 1; page <= pages; page++) {
|
||||||
string pageRequestUrl = $"{requestUrl}&page={page}";
|
string pageRequestUrl = $"{requestUrl}&page={page}";
|
||||||
|
|
||||||
chapters.AddRange(ParseChaptersFromHtml(manga, pageRequestUrl));
|
chapters.AddRange(ParseChaptersFromHtml(manga, pageRequestUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
Log($"Got {chapters.Count} chapters. {manga}");
|
Log($"Got {chapters.Count} chapters. {manga}");
|
||||||
return chapters.Order().ToArray();
|
return chapters.Order().ToArray();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user