解决笔趣塔内容页规则改变导致章节分页的问题

This commit is contained in:
xiongxiaoyang
2019-12-12 16:22:09 +08:00
parent 50d60c6a17
commit 7330fcaae8
6 changed files with 16 additions and 14 deletions

View File

@ -565,11 +565,12 @@ public class BookCrawlServiceImpl implements BookCrawlService {
//查询章节内容
String body3 = getByHttpClient(contentUrl);
String body3 = getByHttpClient(contentUrl.replace("//m.","//www."));
if (body3 != null) {
String start = "『章节错误,点此举报』";
String end = "『加入书签,方便阅读』";
String content = body3.substring(body3.indexOf(start) + start.length(), body3.indexOf(end));
String start = "id=\"content\">";
String end = "<script>";
String content = body3.substring(body3.indexOf(start) + start.length());
content = "<div class=\"article-content font16\" id=\"ChapterBody\" data-class=\"font16\">"+content.substring(0,content.indexOf(end))+"</div>";
//TODO插入章节目录和章节内容
BookIndexDO bookIndex = new BookIndexDO();
bookIndex.setIndexName(indexName);

View File

@ -36,8 +36,8 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: test123456
username: books
password: books
#password:
initialSize: 1
minIdle: 3