Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98c3c6a

Browse files
committed
开源项目
1 parent 1225c3a commit 98c3c6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/server/crawler/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ func autocrawl(needAll bool, whichSite string) {
5454
// 抓取 reddit
5555
go logic.DefaultReddit.Parse("")
5656

57-
// 抓取 www.oschina.net/project
58-
go logic.DefaultProject.ParseProjectList(config.ConfigFile.MustValue("crawl", "project_url"))
57+
projectUrl := config.ConfigFile.MustValue("crawl", "project_url")
58+
if projectUrl != "" {
59+
// 抓取 project
60+
go logic.DefaultProject.ParseProjectList(projectUrl)
61+
}
5962

6063
// 抓取 article
6164
go logic.DefaultAutoCrawl.DoCrawl(false)

0 commit comments

Comments
 (0)