1
0

Fix bug when reading royalroad with extra content

see e.g. https://www.royalroad.com/fiction/36735/the-perfect-run/chapter/761960/127-theomachia
This commit is contained in:
2023-08-20 16:44:58 +02:00
parent 9692dc531f
commit 4cc76a45ef
2 changed files with 27 additions and 7 deletions

View File

@@ -99,4 +99,12 @@ public class Helper
return string.Format("{0}/{1}", uri1, uri2);
}
public static IEnumerable<HtmlNode> RecursiveDescendants(HtmlNode n)
{
foreach (var d1 in n.Descendants())
{
yield return d1;
foreach (var d2 in RecursiveDescendants(d1)) yield return d2;
}
}
}