Commit ff5c6a7f by leiliangliang

更新微博搜索框热词采集程序类名

parent 7d05be2a
...@@ -38,7 +38,6 @@ public class WeiBoSearchBoxHotWords { ...@@ -38,7 +38,6 @@ public class WeiBoSearchBoxHotWords {
*/ */
private Date time; private Date time;
public WeiBoSearchBoxHotWords() { public WeiBoSearchBoxHotWords() {
} }
......
...@@ -23,6 +23,7 @@ public class DBConfig { ...@@ -23,6 +23,7 @@ public class DBConfig {
weiBoUserCollName = conf.getProperty("weiBoUserCollName"); weiBoUserCollName = conf.getProperty("weiBoUserCollName");
weiBoSearchBoxHotWordsCollName = conf.getProperty("weiBoSearchBoxHotWordsCollName"); weiBoSearchBoxHotWordsCollName = conf.getProperty("weiBoSearchBoxHotWordsCollName");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -53,6 +53,7 @@ public class WeiBoSearchBoxHotWordsCrawler { ...@@ -53,6 +53,7 @@ public class WeiBoSearchBoxHotWordsCrawler {
} }
} }
//解析页面数据 //解析页面数据
private static int ansysData(String htmlBody, Date date) { private static int ansysData(String htmlBody, Date date) {
//使用静态WeiBoSearchDao,防止频繁连数据库 //使用静态WeiBoSearchDao,防止频繁连数据库
......
...@@ -72,6 +72,7 @@ public class WeiBoSearchBoxHotWordsDao { ...@@ -72,6 +72,7 @@ public class WeiBoSearchBoxHotWordsDao {
} }
} }
} }
} }
...@@ -601,14 +601,15 @@ public class GatherTimer { ...@@ -601,14 +601,15 @@ public class GatherTimer {
logger.info("微博要闻榜采集结束..."); logger.info("微博要闻榜采集结束...");
} }
/** /**
*微博搜索采集 *微博搜索框热词采集
*/ */
@Async(value = "myScheduler") @Async(value = "myScheduler")
@Scheduled(cron = "0 * * * * ? ") @Scheduled(cron = "0 * * * * ? ")
public void crawlerWeiBoSearch(){ public void crawlerWeiBoSearchBoxHotWords(){
logger.info("微博搜索采集开始........"); logger.info("微博搜索框热词采集开始........");
Date date = DateUtils.getMillSecondTime(new Date()); Date date = DateUtils.getMillSecondTime(new Date());
weiBoSearchCrawler.weiBoSearch(date); WeiBoSearchBoxHotWordsCrawler.weiBoSearchBoxHotWords(date);
logger.info("微博搜索采集结束........"); logger.info("微博搜索框热词采集结束........");
} }
} }
...@@ -13,6 +13,7 @@ mongoUri=mongodb://searchhotcrawleruser:searchhotcrawler1q2w3e4r@192.168.0.150:2 ...@@ -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://202.107.192.94:37017/hot_search_list
#mongoUri=mongodb://192.168.0.66:27017/ #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 #mongoUri=mongodb://searchhotcrawleruser:searchhotcrawler1q2w3e4r@192.168.0.101:30000/hot_search_list?authSource=admin&authMechanism=SCRAM-SHA-1
dbName=hot_search_list dbName=hot_search_list
searchCollName=hot_search_list searchCollName=hot_search_list
searchCacheCollName=hot_search_cache searchCacheCollName=hot_search_cache
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment