Mangaworld Volume and Chapter number Parsing.
This commit is contained in:
parent
d17ca1d97a
commit
e368c3c98a
@ -153,10 +153,13 @@ public class Mangaworld: MangaConnector
|
||||
{
|
||||
foreach (HtmlNode volNode in document.DocumentNode.SelectNodes("//div[contains(concat(' ',normalize-space(@class),' '),'volume-element')]"))
|
||||
{
|
||||
string volume = volNode.SelectNodes("div").First(node => node.HasClass("volume")).SelectSingleNode("p").InnerText.Split(' ')[^1];
|
||||
string volume = Regex.Match(volNode.SelectNodes("div").First(node => node.HasClass("volume")).SelectSingleNode("p").InnerText,
|
||||
@"[Vv]olume ([0-9]+).*").Groups[1].Value;
|
||||
foreach (HtmlNode chNode in volNode.SelectNodes("div").First(node => node.HasClass("volume-chapters")).SelectNodes("div"))
|
||||
{
|
||||
string number = chNode.SelectSingleNode("a").SelectSingleNode("span").InnerText.Split(" ")[^1];
|
||||
|
||||
string number = Regex.Match(chNode.SelectSingleNode("a").SelectSingleNode("span").InnerText,
|
||||
@"[Cc]apitolo ([0-9]+).*").Groups[1].Value;
|
||||
string url = chNode.SelectSingleNode("a").GetAttributeValue("href", "");
|
||||
ret.Add(new Chapter(manga, null, volume, number, url));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user