Tommy131 / KuaishouParser

全网功能最全的快手短视频解析工具
Apache License 2.0
105 stars 18 forks source link

[Question] How to get cookies? #7

Closed nhantamz closed 2 years ago

nhantamz commented 2 years ago

Please post your issue in the format below.

BUG description: What BUG did you encounter?

--- Please write some to description this bug. --- I got issue when I tried to download video from kuai. I have logged in to https://www.kuaishou.com and got the cookies, pasted in config.json

image

Error log / screenshot:

--- Put your log or pictrue below --- [OwOBlogErrorHandler/EMERGENCY] > TypeError: Return value of application\kuai\api\Graphql::getResult() must be an instance of application\kuai\api\Graphql or null, instance of stdClass returned in \application\kuai\api\Graphql.php:149

How did this BUG come about?

--- the cause of the bug --- I ran cmd: php owo kuai 3xymped4j8h8wia

Your server operating environment:

--- Environment description (e.g. below) --- System: Windows 11 OwO-Version: Development(v1.0.3-dev) Web Environment:

  • Nginx 1.18.0
  • PHP 7.4
  • MySQL 5.7
  • ...
Tommy131 commented 2 years ago

Thanks for the issue, I'll fix it in the next commit.

Tommy131 commented 2 years ago

@nhantamz check the newest version with OwOFrame and KuaishouParser. If that works, then you can safely close this issue please :) Commit: 23314ebeace23bac61a18536ba8e81bc5b21655a

Tommy131 commented 2 years ago

请在之后的Issue中使用标准模板。Please use the standard Issue template for the future.

nhantamz commented 2 years ago

@nhantamz check the newest version with OwOFrame and KuaishouParser. If that works, then you can safely close this issue please :) Commit: 23314eb

bro, I have tried new OwO and Parser, logged in on web, open f12 and get cookie from document.cookie, copied to config.json and tried to run "php owo kuai 3xqdujaxzn2fni6"

and get [Console/ERROR] > [0x002] 请求失败, 请稍后重试.

cookie format I got: did=web_59f616fb2a7a2b4efd48024e1b78f8e4; didv=1662719369793; userId=3024208584; kuaishou.server.web_ph=d44b01f22ad291ddf1b80f71176f10482b51

Tommy131 commented 2 years ago

@nhantamz check the newest version with OwOFrame and KuaishouParser. If that works, then you can safely close this issue please :) Commit: 23314eb

bro, I have tried new OwO and Parser, logged in on web, open f12 and get cookie from document.cookie, copied to config.json and tried to run "php owo kuai 3xqdujaxzn2fni6"

and get [Console/ERROR] > [0x002] 请求失败, 请稍后重试.

cookie format I got: did=web_59f616fb2a7a2b4efd48024e1b78f8e4; didv=1662719369793; userId=3024208584; kuaishou.server.web_ph=d44b01f22ad291ddf1b80f71176f10482b51

Actually before I pushed commits from KuaishouParser, I had tested it and it had worked on my PC. You need different cookies from www.kuaishou.com and live.kuaishou.com. I used command owo kuai -login and owo kuai -login live to get cookies, it works too. If it's still not working, try to get a proxy server from mainland China, it may happen between yours internet and Kuaishou's server problem(s).

Tommy131 commented 2 years ago

@nhantamz check this one? It works on my PC. image

Tommy131 commented 2 years ago

This Issue will be closed because of: