diff --git a/src/syosetuDownloader/Syousetsu.cs b/src/syosetuDownloader/Syousetsu.cs index 58e3588..24892e3 100644 --- a/src/syosetuDownloader/Syousetsu.cs +++ b/src/syosetuDownloader/Syousetsu.cs @@ -235,6 +235,8 @@ private static HtmlDocument GetPage(string link, CookieContainer cookies) public static string GetNovelHeader(HtmlDocument doc, Constants.FileType fileType) { HtmlNode headerNode = doc.DocumentNode.SelectSingleNode("//div[@id='novel_p']"); + if (headerNode == null) { return String.Empty; } + if (fileType == Constants.FileType.Text) { string s = headerNode.InnerText; @@ -255,9 +257,10 @@ public static string GetNovelHeader(HtmlDocument doc, Constants.FileType fileTyp sb.AppendLine("