Skip to content

Commit

Permalink
2.6.0发布,新增笔趣窝源
Browse files Browse the repository at this point in the history
  • Loading branch information
x201206030 committed Jun 22, 2020
1 parent ef36527 commit 05d9e22
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 8 deletions.
2 changes: 1 addition & 1 deletion novel-front/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>xyz.zinglizingli</groupId>
<artifactId>novel-front</artifactId>
<version>2.4.1.beta</version>
<version>2.5.0.beta</version>
<name>novel-front</name>
<description>小说精品楼-前台web网站</description>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package xyz.zinglizingli.books.core.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import xyz.zinglizingli.books.core.crawl.BaseHtmlCrawlSource;
import xyz.zinglizingli.books.core.crawl.BiquCrawlSource;

/**
* @author 11797
*/
@Slf4j
@Configuration
public class CrawlBiquwoConfig {


@Bean
@ConfigurationProperties(prefix = "biquwo.crawlsource") // prefix值必须是application.yml中对应属性的前缀
@ConditionalOnProperty(prefix = "crawl.website",name = "type",havingValue = "6")
public BaseHtmlCrawlSource biquwoCrawlSource() {
return new BiquCrawlSource();
}


}
19 changes: 18 additions & 1 deletion novel-front/src/main/resources/application-crawl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,21 @@ biquge:
pic-pattern: <div\s+class="block_img2">\s*<img\s+src="([^"]+)"
intro-pattern: class="review">([^/]+)</p>
catalog-url-pattern: <a\s+href="(/ddk\d+/all.html)">查看完整目录</a>
catalog-pattern: <dd>\s*<a\s+href="(\d+\.html)"\s+title="([^"]+)">([^<]+)</a>\s*</dd>
catalog-pattern: <dd>\s*<a\s+href="(\d+\.html)"\s+title="([^"]+)">([^<]+)</a>\s*</dd>


biquwo:
crawlsource:
index-url: http://m.biquwo.net
list-page-url: http://m.biquwo.net/sort{0}/0/{1}.html
book-url-pattern: href="/(dudu/\d+/\d+)/"
score-pattern: <div\s+class="score">(\d+\.\d+)分</div>
book-name-pattern: <p class="title">([^/]+)</p>
author-pattern: 作者:([^/]+)<
status-pattern: 状态:([^/]+)</li>
cat-pattern: 类别:([^/]+)</li>
update-time-pattern: 更新:(\d+-\d+-\d+\s\d+:\d+:\d+)</a>
pic-pattern: <img src="([^>]+)"\s+onerror="this.src=
intro-pattern: class="review">([^<]+)</p>
catalog-url-pattern: <a\s+href="(/dudu/\d+/\d+/all\.html)">查看完整目录</a>
catalog-pattern: <a\s+style=""\s+href="(/dudu/\d+/\d+/\d+\.html)">([^/]+)</a>
4 changes: 2 additions & 2 deletions novel-front/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ books:
#爬取小说数量
maxNum: 300000

#爬取的网站名称类型 1:笔趣岛 ,2:笔趣塔,3:顶点小说 ,4:百书斋 更多网站解析中,敬请期待
#爬取的网站名称类型 1:笔趣岛 ,2:笔趣塔,3:顶点小说 ,4:百书斋,6: 笔趣窝 更多网站解析中,敬请期待
crawl:
website:
type: 3
type: 6



Expand Down
8 changes: 4 additions & 4 deletions script/crawlbook/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ mybatis:
mysql: {charset: utf8mb4}
books: {lowestScore: 6.0}
crawl:
patten: 3
website: {type: 3}
soft-novel: '1'
manhua: '1'
patten: '1'
website: {type: 6}
soft-novel: '0'
manhua: '0'
logging: {config: 'classpath:logback-boot.xml'}
Binary file modified script/crawlbook/crawl-book-1.0-SNAPSHOT.jar
Binary file not shown.

0 comments on commit 05d9e22

Please sign in to comment.