Fixed input string not being in correct format
This commit is contained in:
parent
c965bc38d1
commit
7c7d43021e
3
.gitignore
vendored
3
.gitignore
vendored
@ -18,4 +18,5 @@ riderModule.iml
|
||||
/dataSources.local.xml
|
||||
/.idea
|
||||
cover.jpg
|
||||
cover.png
|
||||
cover.png
|
||||
/.vscode
|
@ -154,7 +154,7 @@ public class MangaKatana : MangaConnector
|
||||
//Return Chapters ordered by Chapter-Number
|
||||
List<Chapter> chapters = ParseChaptersFromHtml(manga, requestUrl);
|
||||
Log($"Got {chapters.Count} chapters. {manga}");
|
||||
return chapters.OrderBy(chapter => Convert.ToSingle(chapter.chapterNumber, numberFormatDecimalPoint)).ToArray();
|
||||
return chapters.OrderBy(chapter => chapter.chapterNumber ?? chapter.volumeNumber).ToArray();
|
||||
}
|
||||
|
||||
private List<Chapter> ParseChaptersFromHtml(Manga manga, string mangaUrl)
|
||||
@ -167,9 +167,9 @@ public class MangaKatana : MangaConnector
|
||||
|
||||
HtmlNode chapterList = document.DocumentNode.SelectSingleNode("//div[contains(@class, 'chapters')]/table/tbody");
|
||||
|
||||
Regex volumeRex = new(@"Volume ([0-9]+)");
|
||||
Regex chapterNumRex = new(@"https:\/\/mangakatana\.com\/manga\/.+\/c([0-9\.]+)");
|
||||
Regex chapterNameRex = new(@"Chapter [0-9\.]+: (.*)");
|
||||
Regex volumeRex = new(@"(Volume ([0-9]+))|(Vol\.[0-9]+)");
|
||||
Regex chapterNumRex = new(@"https:\/\/mangakatana\.com\/manga\/.+\/(c([0-9\.]+))|(v[0-9]+c[0-9]+)");
|
||||
Regex chapterNameRex = new(@"Chapter [0-9\.]+:? (.*)");
|
||||
|
||||
|
||||
foreach (HtmlNode chapterInfo in chapterList.Descendants("tr"))
|
||||
|
Loading…
Reference in New Issue
Block a user