mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
解决笔趣塔内容页规则改变导致章节分页的问题
This commit is contained in:
parent
50d60c6a17
commit
7330fcaae8
@ -565,11 +565,12 @@ public class BookCrawlServiceImpl implements BookCrawlService {
|
|||||||
|
|
||||||
|
|
||||||
//查询章节内容
|
//查询章节内容
|
||||||
String body3 = getByHttpClient(contentUrl);
|
String body3 = getByHttpClient(contentUrl.replace("//m.","//www."));
|
||||||
if (body3 != null) {
|
if (body3 != null) {
|
||||||
String start = "『章节错误,点此举报』";
|
String start = "id=\"content\">";
|
||||||
String end = "『加入书签,方便阅读』";
|
String end = "<script>";
|
||||||
String content = body3.substring(body3.indexOf(start) + start.length(), body3.indexOf(end));
|
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插入章节目录和章节内容
|
//TODO插入章节目录和章节内容
|
||||||
BookIndexDO bookIndex = new BookIndexDO();
|
BookIndexDO bookIndex = new BookIndexDO();
|
||||||
bookIndex.setIndexName(indexName);
|
bookIndex.setIndexName(indexName);
|
||||||
|
@ -36,8 +36,8 @@ spring:
|
|||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.jdbc.Driver
|
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
|
url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: books
|
||||||
password: test123456
|
password: books
|
||||||
#password:
|
#password:
|
||||||
initialSize: 1
|
initialSize: 1
|
||||||
minIdle: 3
|
minIdle: 3
|
||||||
|
@ -142,11 +142,12 @@ public class BiquCrawlSource extends BaseHtmlCrawlSource {
|
|||||||
|
|
||||||
|
|
||||||
//查询章节内容
|
//查询章节内容
|
||||||
String body3 = RestTemplateUtil.getBodyByUtf8(contentUrl);
|
String body3 = RestTemplateUtil.getBodyByUtf8(contentUrl.replace("//m.","//www."));
|
||||||
if (body3 != null) {
|
if (body3 != null) {
|
||||||
String start = "『章节错误,点此举报』";
|
String start = "id=\"content\">";
|
||||||
String end = "『加入书签,方便阅读』";
|
String end = "<script>";
|
||||||
String content = body3.substring(body3.indexOf(start) + start.length(), body3.indexOf(end));
|
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插入章节目录和章节内容
|
//TODO插入章节目录和章节内容
|
||||||
BookIndex bookIndex = new BookIndex();
|
BookIndex bookIndex = new BookIndex();
|
||||||
bookIndex.setIndexName(indexName);
|
bookIndex.setIndexName(indexName);
|
||||||
|
@ -434,8 +434,8 @@
|
|||||||
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
|
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
|
||||||
style="color: rgb(0, 0, 0); font-size: 25px;">
|
style="color: rgb(0, 0, 0); font-size: 25px;">
|
||||||
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >
|
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >
|
||||||
<a
|
<span
|
||||||
href="javascript:void(0);" th:utext="${bookContent.content}"></a></p>
|
th:utext="${bookContent.content}"></span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
|
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
|
||||||
|
|
||||||
|
@ -9,6 +9,6 @@ mybatis:
|
|||||||
mysql: {charset: utf8mb4}
|
mysql: {charset: utf8mb4}
|
||||||
books: {lowestScore: '8.5'}
|
books: {lowestScore: '8.5'}
|
||||||
crawl:
|
crawl:
|
||||||
website: {type: '1'}
|
website: {type: '2'}
|
||||||
soft-novel: '1'
|
soft-novel: '0'
|
||||||
manhua: '0'
|
manhua: '0'
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user