コード例 #1
0
 @Test
 public void getArticleListPages() throws IOException, ParserException {
   String html =
       FileUtil.readTextFile(
           "src/test/resources/com/jiangjianan/stock/server/util/articlelist_1147298365_0_1.html");
   assertEquals(127, HtmlUtil.getArticleListPages(html, "utf-8"));
 }
コード例 #2
0
 @Test
 public void getContentById() throws IOException, ParserException {
   String html =
       FileUtil.readTextFile(
           "src/test/resources/com/jiangjianan/stock/server/util/blog_4462623d0102ee74.html");
   HtmlUtil.getContentByTag(html, "utf-8", "id", "sina_keyword_ad_area2");
 }