facert / awesome-spider

爬虫集合
MIT License
21.94k stars 4.79k forks source link

快手pc端爬去作品cookie动态校验问题,大神能否帮忙指点一下 #54

Open FengYe182 opened 5 years ago

FengYe182 commented 5 years ago
  1. 快手主播:

    https://live.kuaishou.com/profile/3xsx74sidgkz2bq

  2. 快手作品url:

    https://live.kuaishou.com/graphql

  3. 请求header:

Origin: https://live.kuaishou.com Referer: https://live.kuaishou.com/profile/3xsx74sidgkz2bq User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134 Cache-Control: max-age=0 accept: / content-type: application/json Accept-Language: zh-CN Accept-Encoding: gzip, deflate, br Host: live.kuaishou.com Content-Length: 1323 Connection: Keep-Alive Cookie: client_key=65890b29; clientid=3; did=web_221d3c8e7f94a5b146b513e484bf2a54; kuaishou.live.bfb1s=ac5f27b3b62895859c4c1622f49856a4 cookie:通过webmagic框架调用返回作品列表“$.data.publicFeeds.list”为null

  1. post请求参数

:{"operationName":"publicFeedsQuery","variables":{"principalId":"3xsx74sidgkz2bq","pcursor":"","count":24},"query":"query publicFeedsQuery($principalId: String, $pcursor: String, $count: Int) {\n publicFeeds(principalId: $principalId, pcursor: $pcursor, count: $count) {\n pcursor\n live {\n user {\n id\n kwaiId\n eid\n profile\n name\n living\n typename\n }\n watchingCount\n src\n title\n gameId\n gameName\n categoryId\n liveStreamId\n playUrls {\n quality\n url\n typename\n }\n followed\n type\n living\n redPack\n liveGuess\n anchorPointed\n latestViewed\n expTag\n typename\n }\n list {\n photoId\n caption\n thumbnailUrl\n poster\n viewCount\n likeCount\n commentCount\n timestamp\n workType\n type\n playUrl\n useVideoPlayer\n imgUrls\n imgSizes\n magicFace\n musicName\n location\n liked\n onlyFollowerCanComment\n relativeHeight\n width\n height\n user {\n id\n eid\n name\n profile\n typename\n }\n expTag\n typename\n }\n typename\n }\n}\n"}