Commit 57cecc63 by chenweitao

Merge branch 'working' into 'master'

快手热榜url字段采集更新

See merge request !102
parents d525528c 8328e32d
......@@ -72,7 +72,10 @@ public class KuaiShouHotSearchCrawler {
Double d = Double.valueOf(ws[0])*10000;
long hot = d.longValue();
//话题链接
String url = object.getString("poster");
String ul = object.getString("poster");
String[] split = ul.split("clientCacheKey=");
String s = split[1].substring(0,15);
String url ="https://www.kuaishou.com/short-video/"+s+"?trendingId="+name;
//标签类型
String tagType =null;
if (object.containsKey("tagType")){
......
......@@ -73,7 +73,11 @@ public class KuaiShouHotSearchCrawlerTest {
Double d = Double.valueOf(ws[0])*10000;
long hot = d.longValue();
//话题链接
String url = object.getString("poster");
String ul = object.getString("poster");
String[] split = ul.split("clientCacheKey=");
String s = split[1].substring(0,15);
System.out.println(s);
String url ="https://www.kuaishou.com/short-video/"+s+"?trendingId="+name;
//标签类型
String tagType =null;
if (object.containsKey("tagType")){
......
......@@ -2,6 +2,7 @@ package com.zhiwei.searchhotcrawler.test;
import com.zhiwei.searchhotcrawler.bean.HotSearchList;
import com.zhiwei.searchhotcrawler.crawler.BaiDuHotSearchCrawler;
import com.zhiwei.searchhotcrawler.crawler.KuaiShouHotSearchCrawler;
import com.zhiwei.searchhotcrawler.crawler.SougoHotSearchCrawler;
import com.zhiwei.searchhotcrawler.crawler.ZhihuHotSearchCrawler;
import com.zhiwei.searchhotcrawler.util.TipsUtils;
......@@ -32,7 +33,7 @@ public class KuaiShouHotSearchRun extends Thread{
private void getHotList() {
log.info("快手热榜采集开始........");
List<HotSearchList> kuaiShouList = KuaiShouHotSearchCrawlerTest.KuaiShouHotSearchCrawler(new Date());
List<HotSearchList> kuaiShouList = KuaiShouHotSearchCrawler.KuaiShouHotSearchCrawler(new Date());
log.info("{}, 此轮快手热榜采集到的数据量为:{}", new Date(), Integer.valueOf(kuaiShouList != null ? kuaiShouList.size() : 0));
TipsUtils.addHotList("快手热榜",kuaiShouList);
log.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