Commit 3920b798 by chenweitao

Merge branch 'working' into 'master'

增加淘宝日志

See merge request !108
parents 478bf6bd 06b492d4
...@@ -46,6 +46,8 @@ public class TaoBaoHotSearchCrawler { ...@@ -46,6 +46,8 @@ public class TaoBaoHotSearchCrawler {
String[] splitEnc = enc.split(";"); String[] splitEnc = enc.split(";");
String _m_h5_tk_enc = splitEnc[0]; String _m_h5_tk_enc = splitEnc[0];
headerMap.put("cookie", _m_h5_tk + ";" + _m_h5_tk_enc); headerMap.put("cookie", _m_h5_tk + ";" + _m_h5_tk_enc);
log.info("获取cookie",_m_h5_tk + ";" + _m_h5_tk_enc);
log.info("获取响应结果",response);
} catch (Exception e) { } catch (Exception e) {
log.error("解析淘宝热搜时出现解析错误,页面结构有问题", e); log.error("解析淘宝热搜时出现解析错误,页面结构有问题", e);
} }
......
...@@ -520,17 +520,17 @@ public class GatherTimer { ...@@ -520,17 +520,17 @@ public class GatherTimer {
TipsUtils.addHotList(HotSearchType.快手热榜.name(), kuaiShouList); TipsUtils.addHotList(HotSearchType.快手热榜.name(), kuaiShouList);
logger.info("快手热榜采集结束..."); logger.info("快手热榜采集结束...");
} }
// /** /**
// *淘宝热搜采集 *淘宝热搜采集
// */ */
// @Async(value = "myScheduler") @Async(value = "myScheduler")
// @Scheduled(cron = "0 * * * * ? ") @Scheduled(cron = "0 * * * * ? ")
// public void crawlerTaoBao(){ public void crawlerTaoBao(){
// logger.info("淘宝热搜开始采集..."); logger.info("淘宝热搜开始采集...");
// Date date = DateUtils.getMillSecondTime(new Date()); Date date = DateUtils.getMillSecondTime(new Date());
// List<HotSearchList> taoBaoList = TaoBaoHotSearchCrawler.taoBaoHotSearch(date); List<HotSearchList> taoBaoList = TaoBaoHotSearchCrawler.taoBaoHotSearch(date);
// logger.info("{}, 淘宝热搜此轮采集到的数据量为:{}", new Date(), taoBaoList != null ? taoBaoList.size() : 0); logger.info("{}, 淘宝热搜此轮采集到的数据量为:{}", new Date(), taoBaoList != null ? taoBaoList.size() : 0);
// TipsUtils.addHotList(HotSearchType.淘宝热搜.name(), taoBaoList); TipsUtils.addHotList(HotSearchType.淘宝热搜.name(), taoBaoList);
// logger.info("淘宝热搜采集结束..."); logger.info("淘宝热搜采集结束...");
// } }
} }
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