Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
searchhotcrawler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhiwei
searchhotcrawler
Commits
ff5c6a7f
Commit
ff5c6a7f
authored
Nov 15, 2021
by
leiliangliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新微博搜索框热词采集程序类名
parent
7d05be2a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
6 deletions
+10
-6
src/main/java/com/zhiwei/searchhotcrawler/bean/WeiBoSearchBoxHotWords.java
+0
-1
src/main/java/com/zhiwei/searchhotcrawler/config/DBConfig.java
+1
-0
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiBoSearchBoxHotWordsCrawler.java
+1
-0
src/main/java/com/zhiwei/searchhotcrawler/dao/WeiBoSearchBoxHotWordsDao.java
+1
-0
src/main/java/com/zhiwei/searchhotcrawler/timer/quartz/GatherTimer.java
+6
-5
src/main/resources/db.properties
+1
-0
No files found.
src/main/java/com/zhiwei/searchhotcrawler/bean/WeiBoSearchBoxHotWords.java
View file @
ff5c6a7f
...
...
@@ -38,7 +38,6 @@ public class WeiBoSearchBoxHotWords {
*/
private
Date
time
;
public
WeiBoSearchBoxHotWords
()
{
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/config/DBConfig.java
View file @
ff5c6a7f
...
...
@@ -23,6 +23,7 @@ public class DBConfig {
weiBoUserCollName
=
conf
.
getProperty
(
"weiBoUserCollName"
);
weiBoSearchBoxHotWordsCollName
=
conf
.
getProperty
(
"weiBoSearchBoxHotWordsCollName"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/crawler/WeiBoSearchBoxHotWordsCrawler.java
View file @
ff5c6a7f
...
...
@@ -53,6 +53,7 @@ public class WeiBoSearchBoxHotWordsCrawler {
}
}
//解析页面数据
private
static
int
ansysData
(
String
htmlBody
,
Date
date
)
{
//使用静态WeiBoSearchDao,防止频繁连数据库
...
...
src/main/java/com/zhiwei/searchhotcrawler/dao/WeiBoSearchBoxHotWordsDao.java
View file @
ff5c6a7f
...
...
@@ -72,6 +72,7 @@ public class WeiBoSearchBoxHotWordsDao {
}
}
}
}
src/main/java/com/zhiwei/searchhotcrawler/timer/quartz/GatherTimer.java
View file @
ff5c6a7f
...
...
@@ -601,14 +601,15 @@ public class GatherTimer {
logger
.
info
(
"微博要闻榜采集结束..."
);
}
/**
*微博搜索采集
*微博搜索
框热词
采集
*/
@Async
(
value
=
"myScheduler"
)
@Scheduled
(
cron
=
"0 * * * * ? "
)
public
void
crawlerWeiBoSearch
(){
logger
.
info
(
"微博搜索采集开始........"
);
public
void
crawlerWeiBoSearch
BoxHotWords
(){
logger
.
info
(
"微博搜索
框热词
采集开始........"
);
Date
date
=
DateUtils
.
getMillSecondTime
(
new
Date
());
weiBoSearchCrawler
.
weiBoSearch
(
date
);
logger
.
info
(
"微博搜索采集结束........"
);
WeiBoSearchBoxHotWordsCrawler
.
weiBoSearchBoxHotWords
(
date
);
logger
.
info
(
"微博搜索
框热词
采集结束........"
);
}
}
src/main/resources/db.properties
View file @
ff5c6a7f
...
...
@@ -13,6 +13,7 @@ mongoUri=mongodb://searchhotcrawleruser:searchhotcrawler1q2w3e4r@192.168.0.150:2
#mongoUri=mongodb://202.107.192.94:37017/hot_search_list
#mongoUri=mongodb://192.168.0.66:27017/
#mongoUri=mongodb://searchhotcrawleruser:searchhotcrawler1q2w3e4r@192.168.0.101:30000/hot_search_list?authSource=admin&authMechanism=SCRAM-SHA-1
dbName
=
hot_search_list
searchCollName
=
hot_search_list
searchCacheCollName
=
hot_search_cache
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment