Commit 2d38ea3f by leiliangliang

增加快手热榜采集头部信息

parent fe99b01c
......@@ -37,8 +37,14 @@ public class KuaiShouHotSearchCrawler {
public static List<HotSearchList> KuaiShouHotSearchCrawler(Date date) {
//String url = "https://video.kuaishou.com/?utm_source=aa&utm_medium=05&utm_campaign=aa_05_pp_yr&plan_id=138090084&unit_id=5205658029&creative_id=43661481717&keyword_id=202928529242&keyword=202928529242&bd_vid=11937382025080724791";
String url = "https://www.kuaishou.com/?isHome=1";
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
headerMap.put("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.42");
headerMap.put("Host","www.kuaishou.com");
headerMap.put("sec-ch-ua-platform","Windows");
headerMap.put("sec-ch-ua","Microsoft Edge\";v=\"107\", \"Chromium\";v=\"107\", \"Not=A?Brand\";v=\"24");
String htmlBody = null;
Request request = RequestUtils.wrapGet(url);
Request request = RequestUtils.wrapGet(url,headerMap);
Response response = HttpClientUtils.httpBoot.syncCall(request, ProxyServerSupplier.NAT_HEAVY_PROXY);
if (response.hasCause()){
Throwable cause = response.cause();
......
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