first commit

This commit is contained in:
编码猿
2024-09-27 01:10:21 +08:00
commit 4bb91f7aa9
83 changed files with 952 additions and 0 deletions

54
src/http/_config.py Normal file
View File

@@ -0,0 +1,54 @@
class HttpConfig:
url: str = "https://www.kuaishou.com/graphql"
header: list[str,str] = {
'Content-Type': 'application/json',
'Origin': 'https://www.kuaishou.com',
'Host': 'www.kuaishou.com',
'Referer': 'https://www.kuaishou.com/profile/3x2347wkfukzx4g',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
'Cookie': 'kpf=PC_WEB; clientid=3; did=web_fca770657d0a24abb53ddc92bb42e612; didv=1700407978000; userId=58344290; kuaishou.server.web_st=ChZrdWFpc2hvdS5zZXJ2ZXIud2ViLnN0EqABFs7urbq3vvcrvB-IRBSKHXfdVRzblSFx7udepTzeAtgCompa6-aZiv1f_Bb66SubMkCbLODJQ3cn_GxlWWWbPgbQEyul9f7SDKsGphyvK1Pk3aj-yn899D9gR-xj1wiqT_0nA9x3XcPmvuJ8qQzIeLl3236npeMV0i9uYEAeIHDp9RtvPlQ4o0piktgGjMZH13Uhk7-ZfqDuUPQ-mEH7axoSS2UWrTnDahVDKzRYjzjLpJM-IiDXKnEX31rxM9oVovhBLMPSocxSvtN7wyo1oS1nNdvjSCgFMAE; kuaishou.server.web_ph=5b6a8c20ee92347d220cbc98f705f92042fb; kpn=KUAISHOU_VISION'
}
visionProfileLikePhotoList: str = ''' fragment photoContent on PhotoEntity {
__typename
id duration
caption originCaption
likeCount viewCount commentCount realLikeCount
coverUrl photoUrl photoH265Url manifest
manifestH265 videoResource coverUrls
{
url __typename
}
timestamp expTag animatedCoverUrl distance
videoRatio liked stereoType profileUserTopPhoto
musicBlocked riskTagContent riskTagUrl
}
fragment recoPhotoFragment on recoPhotoEntity {
__typename id duration caption originCaption likeCount
viewCount commentCount realLikeCount coverUrl photoUrl photoH265Url manifest
manifestH265 videoResource coverUrls
{ url __typename }
timestamp expTag animatedCoverUrl distance videoRatio liked stereoType
profileUserTopPhoto musicBlocked riskTagContent riskTagUrl
}
fragment feedContent on Feed {
type author
{
id name headerUrl following headerUrls
{
url __typename
} __typename
} photo {
...photoContent ...recoPhotoFragment __typename
} canAddComment llsid status currentPcursor tags
{ type name __typename }
__typename
}
query visionProfileLikePhotoList($pcursor: String, $page: String, $webPageArea: String) {
visionProfileLikePhotoList(pcursor: $pcursor, page: $page, webPageArea: $webPageArea) {
result llsid webPageArea feeds {
...feedContent __typename
} hostName pcursor __typename
}
}'''
httpConfig = HttpConfig