mirror of
https://github.com/201206030/novel-plus.git
synced 2025-06-24 04:46:37 +00:00
1.解决爬虫线程停止失败的bug,2新增新笔趣阁源,兼容更多源站
This commit is contained in:
@ -179,9 +179,13 @@
|
||||
for (var i = 0; i < bookList.length; i++) {
|
||||
var book = bookList[i];
|
||||
|
||||
var end = book.bookDesc.indexOf("<");
|
||||
/*var end = book.bookDesc.indexOf("<");
|
||||
if(end != -1) {
|
||||
book.bookDesc = book.bookDesc.substring(0,end);
|
||||
}*/
|
||||
|
||||
if(book.bookDesc){
|
||||
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"");
|
||||
}
|
||||
|
||||
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
|
||||
|
@ -276,6 +276,10 @@
|
||||
for (var i = 0; i < 6; i++) {
|
||||
var hotRecBook = hotRecBooks[i];
|
||||
|
||||
if(hotRecBook.bookDesc){
|
||||
hotRecBook.bookDesc = hotRecBook.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"");
|
||||
}
|
||||
|
||||
hotRecBooksHtml += ("<div style=\"margin-bottom: 5px\" class=\"layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4\">\n" +
|
||||
" <a href=\"/book/"+hotRecBook.bookId+".html\">\n" +
|
||||
" <div class=\"layui-col-xs5 layui-col-sm4 layui-col-md4 layui-col-lg4\" >\n" +
|
||||
@ -323,9 +327,8 @@
|
||||
for (var i = 0; i < 10; i++) {
|
||||
|
||||
var updateRankBook = updateRankBooks[i];
|
||||
var end = updateRankBook.bookDesc.indexOf("<");
|
||||
if(end != -1) {
|
||||
updateRankBook.bookDesc = updateRankBook.bookDesc.substring(0,end);
|
||||
if(updateRankBook.bookDesc){
|
||||
updateRankBook.bookDesc = updateRankBook.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"");
|
||||
}
|
||||
|
||||
updateRankBookHtml += ("<div style=\"padding-bottom: 30px\"\n" +
|
||||
|
Reference in New Issue
Block a user