なろうブックマーク分析用ツールのPrism+WPFサンプル実装
Revision | cd7200024d254b24e803fc8dcc9bb4d0837a0fd2 (tree) |
---|---|
Zeit | 2022-08-06 20:51:14 |
Autor | yoshy <yoshy.org.bitbucket@gz.j...> |
Commiter | yoshy |
[FIX] ブックマークカテゴリのソート順指定に _ が含まれる場合にカテゴリが取得できない不具合を修正
@@ -38,7 +38,7 @@ namespace TestNarou.OuterEdge.Repository.API | ||
38 | 38 | private const string DATA_TOKEN_REGEX = @"<a id=""logout"" class=""js-logout"" href=""https://syosetu.com/login/logout/"" data-token=""([0-9a-f]+)"">"; |
39 | 39 | |
40 | 40 | private const string CATEGORY_LIST_REGEX = @"<ul class=""category_box"">(.+?)</ul>\s+<div class=""fav_box"">"; |
41 | - private const string CATEGORY_ITEM_REGEX = @"<li.*><a href=""/favnovelmain/list/\?nowcategory=\d+&order=[a-z]+"">(.+?)</a></li>"; | |
41 | + private const string CATEGORY_ITEM_REGEX = @"<li.*><a href=""/favnovelmain/list/\?nowcategory=\d+&order=[_a-z]+"">(.+?)</a></li>"; | |
42 | 42 | private const string CATEGORY_NAME_COUNT_REGEX = @"(.+?)\((\d+)\)"; |
43 | 43 | |
44 | 44 | private const string BOOKMARK_ENTRY_REGEX = @"<table class=""favnovel"">(.+?)</table>"; |
@@ -139,6 +139,7 @@ namespace TestNarou.OuterEdge.Repository.API | ||
139 | 139 | |
140 | 140 | if (!matcher.Success) |
141 | 141 | { |
142 | + logger.Trace(content); | |
142 | 143 | throw new RepositoryException("ブックマークカテゴリが見つかりません。"); |
143 | 144 | } |
144 | 145 |
@@ -150,6 +151,7 @@ namespace TestNarou.OuterEdge.Repository.API | ||
150 | 151 | |
151 | 152 | if (matcherItems.Count == 0) |
152 | 153 | { |
154 | + logger.Trace(categoryList); | |
153 | 155 | throw new RepositoryException("ブックマークカテゴリの明細情報が見つかりません。"); |
154 | 156 | } |
155 | 157 |
@@ -165,6 +167,7 @@ namespace TestNarou.OuterEdge.Repository.API | ||
165 | 167 | |
166 | 168 | if (!matcherNameCount.Success) |
167 | 169 | { |
170 | + logger.Trace(item); | |
168 | 171 | throw new RepositoryException("ブックマークカテゴリ明細情報の形式が想定と異なります。"); |
169 | 172 | } |
170 | 173 |