reqable-app icon indicating copy to clipboard operation
reqable-app copied to clipboard

crul转化时cookie有问题

Open yy05idiot opened this issue 1 year ago • 6 comments

  • 转化后的cookie会重复,导致访问失败,即假设正确的cookie是{'cookie':'a=b'},reqable转出的结果是{'cookie':'a=b, a=b,a=b'}
  • url转化后末尾的=丢失,原url为https://www.zhihu.com/api/v4/comment_v5/articles/430717933/root_comment?order_by=score&limit=20&offset=,在reqable中转化为https://www.zhihu.com/api/v4/comment_v5/articles/430717933/root_comment?order_by=score&limit=20&offset

yy05idiot avatar Apr 10 '24 08:04 yy05idiot

@yy05idiot 你好,感谢反馈。

  1. 转化后的cookie会重复。

原始的cookie值就是重复的呢,还是Reqable多生成了一个重复cookie呢?是否可以给个例子?

url转化后末尾的=丢失

这个应该没有影响,应该是等价的。不知道你是否遇到了具体的问题?

MegatronKing avatar Apr 12 '24 07:04 MegatronKing

你好,如果没有进一步的回复,这个issue我将关闭了。

MegatronKing avatar Apr 22 '24 15:04 MegatronKing

你好,有过一个回复,不知道是不是回复错地方了

原curl如下: curl 'https://api.qian-gua.com/v1/Note/GetNoteHotList?_=1713173041684'
  -H 'accept: application/json, text/plain, /'
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6'
  -H 'content-type: application/json;charset=UTF-8'
  -H 'cookie: _data_chl=key=baidu-qianguaci-pinpaici-qiangua; Hm_lvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713147067; ASP.NET_SessionId=frxpsj3d5qbauyw5d5ze0jbw; Hm_lpvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713172788; User=UserId=4c3bb7368115770e&Password=5a147fefd34277c9f903af206cadba1a&ChildId=58089'
  -H 'origin: https://app.qian-gua.com' 
  -H 'referer: https://app.qian-gua.com/' 
  -H 'sec-ch-ua: "Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
  -H 'sec-ch-ua-mobile: ?0'
  -H 'sec-ch-ua-platform: "Windows"'
  -H 'sec-fetch-dest: empty'
  -H 'sec-fetch-mode: cors'
  -H 'sec-fetch-site: same-site'
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0'
  --data-raw '{"pageindex":1,"pagesize":50,"sorttype":10,"days":-1,"starttime":"2023-04-15","endtime":"2024-04-15","listtypecopy":0,"keyword":"尿裤","searchdatatype":[0,1,2]}'

reqable在API调试中转化的请求可以成功发送,此时生成的cookie为 _data_chl=key=baidu-qianguaci-pinpaici-qiangua; Hm_lvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713147067; ASP.NET_SessionId=frxpsj3d5qbauyw5d5ze0jbw; Hm_lpvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713172788; User=UserId=4c3bb7368115770e&Password=5a147fefd34277c9f903af206cadba1a&ChildId=58089

但是使用“生成代码”按钮时,生成的代码中cookie如下: "_data_chl=key=baidu-qianguaci-pinpaici-qiangua; Hm_lvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713147067; ASP.NET_SessionId=frxpsj3d5qbauyw5d5ze0jbw; Hm_lpvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713172788; User=UserId=4c3bb7368115770e&Password=5a147fefd34277c9f903af206cadba1a&ChildId=58089, _data_chl=key=baidu-qianguaci-pinpaici-qiangua; Hm_lvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713147067; ASP.NET_SessionId=frxpsj3d5qbauyw5d5ze0jbw; Hm_lpvt_c6d9cdbaf0b464645ff2ee32a71ea1ae=1713172788; User=UserId=4c3bb7368115770e&Password=5a147fefd34277c9f903af206cadba1a&ChildId=58089"

使用生成代码发送请求时,显示用户未登录,当去掉重复部分,即_data_chl=之后的部分后,请求可以正常使用

BTW,reqable真的非常非常棒,感谢您!

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Megatron King @.> 发送时间: 2024年4月22日 23:57 收件人: reqable/reqable-app @.> 抄送: yy05idiot @.>, Mention @.> 主题: Re: [reqable/reqable-app] crul转化时cookie有问题 (Issue #573)

你好,如果没有进一步的回复,这个issue我将关闭了。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

yy05idiot avatar Apr 23 '24 00:04 yy05idiot

感谢回复,确实是有点问题。

MegatronKing avatar Apr 23 '24 07:04 MegatronKing

刚刚搞错了。最新版本我测试没有这个问题,不知道你用的是哪个版本?

MegatronKing avatar Apr 23 '24 08:04 MegatronKing

2.4.0,可能确实是版本问题,我先升级一下,谢谢大佬

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Megatron King @.> 发送时间: 2024年4月23日 16:04 收件人: reqable/reqable-app @.> 抄送: yy05idiot @.>, Mention @.> 主题: Re: [reqable/reqable-app] crul转化时cookie有问题 (Issue #573)

刚刚搞错了。最新版本我测试没有这个问题,不知道你用的是哪个版本?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

yy05idiot avatar Apr 23 '24 09:04 yy05idiot