|
@@ -135,7 +135,7 @@ class KuaiShouFollow:
|
|
|
'Accept': '*/*',
|
|
|
'Content-Type': 'application/json',
|
|
|
'Origin': 'https://www.kuaishou.com',
|
|
|
- 'Cookie': 'did=web_c11041a45efb379fa3e11198d58d1dd1;; clientid=3; kpf=PC_WEB; kpn=KUAISHOU_VISION',
|
|
|
+ 'Cookie': 'did=web_cb989442745f6db4521d6b21032475a6;; clientid=3; kpf=PC_WEB; kpn=KUAISHOU_VISION',
|
|
|
'Content-Length': '552',
|
|
|
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
|
|
'Host': 'www.kuaishou.com',
|
|
@@ -384,7 +384,7 @@ class KuaiShouFollow:
|
|
|
"query": "fragment photoContent on PhotoEntity {\n id\n duration\n caption\n originCaption\n likeCount\n viewCount\n realLikeCount\n coverUrl\n photoUrl\n photoH265Url\n manifest\n manifestH265\n videoResource\n coverUrls {\n url\n __typename\n }\n timestamp\n expTag\n animatedCoverUrl\n distance\n videoRatio\n liked\n stereoType\n profileUserTopPhoto\n musicBlocked\n __typename\n}\n\nfragment feedContent on Feed {\n type\n author {\n id\n name\n headerUrl\n following\n headerUrls {\n url\n __typename\n }\n __typename\n }\n photo {\n ...photoContent\n __typename\n }\n canAddComment\n llsid\n status\n currentPcursor\n tags {\n type\n name\n __typename\n }\n __typename\n}\n\nquery visionProfilePhotoList($pcursor: String, $userId: String, $page: String, $webPageArea: String) {\n visionProfilePhotoList(pcursor: $pcursor, userId: $userId, page: $page, webPageArea: $webPageArea) {\n result\n llsid\n webPageArea\n feeds {\n ...feedContent\n __typename\n }\n hostName\n pcursor\n __typename\n }\n}\n"
|
|
|
})
|
|
|
headers = {
|
|
|
- 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0',
|
|
|
+ 'User-Agent': get_random_user_agent('pc'),
|
|
|
'Accept': '*/*',
|
|
|
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
|
|
|
'Accept-Encoding': 'gzip, deflate, br',
|
|
@@ -610,6 +610,7 @@ class KuaiShouFollow:
|
|
|
return
|
|
|
cls.get_videoList(log_type, crawler, strategy, our_uid, out_uid, oss_endpoint, env, machine,
|
|
|
pcursor=pcursor)
|
|
|
+ time.sleep(random.randint(1, 3))
|
|
|
except Exception as e:
|
|
|
Common.logger(log_type, crawler).error(f"get_videoList:{e}\n")
|
|
|
|