Merge branch 'refs/heads/cuttingedge-merge-ServerV2' into postgres-Server-V2

# Conflicts:
#	API/Schema/MangaConnectors/Webtoons.cs
#	Tranga/Server.cs
This commit is contained in:
2025-03-02 10:07:33 +01:00
5 changed files with 16 additions and 14 deletions

View File

@ -152,12 +152,14 @@ public class Webtoons : MangaConnector
return Array.Empty<Chapter>();
// 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>();
for(int page = 1; page <= pages; page++) {
string pageRequestUrl = $"{requestUrl}&page={page}";
chapters.AddRange(ParseChaptersFromHtml(manga, pageRequestUrl));
}