首页 新闻 会员 周边 捐助

想给老婆买个iphone,闲着没事编写个iphone抢购,但一直取不到iPhone的cookie,各位赐教。

0
悬赏园豆:100 [已关闭问题] 关闭于 2022-10-04 02:00

我使用的是FlURL来模拟请求。

接口用fildder抓取的。
现在卡在第一步,获取不到Cookie,拿不到sessionId,只能取到域名对应的cookie
比如get调用 https://www.apple.com.cn/shop/buy-iphone/iphone-13/MNGC3CH/A
用谷歌浏览器能找到12个cookie,但接口调用只返回一个domain为www.apple.com.cn的cookie。
我想拿到.app.com.cn的所有cookie。
如下图

用filder能抓取到,cookie在request header里面,如下----是fildder抓取的

GET https://www.apple.com.cn/shop/buy-iphone/iphone-13 HTTP/1.1
Host: www.apple.com.cn
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://www.apple.com.cn/iphone/
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: geo=CN; as_sfa=Mnxjbnxjbnx8emhfQ058Y29uc3VtZXJ8aW50ZXJuZXR8MHwwfDE; at_check=true; s_fid=1745C48B88BD1E09-24AB3D1415B5D6A5; s_cc=true; s_vi=[CS]v1|319C820BF97556C0-400002FD875D326C[CE]; mbox=session#3f3f4547ee594eff80136e44b1e62d99#1664682842|PC#3f3f4547ee594eff80136e44b1e62d99.32_0#1664682785; dssid2=ca75ec81-0f16-4852-9d04-c6ba1d62df5c; dssf=1; as_pcts=iLNGJiMiOe-RYB:gmNB3p4brZQ8PH7rA22WX9rzeI+LkpbZq13wYDIBDgm2Np+XjqtmJNs5rzMaQPT:dqgSX3HJhrVCQXnKr-P3pGqlw6t6bT0eULx2MkoY9CGZOS43jk0kUa7-1DxxyM62; as_dc=nc; as_atb=1.0|MjAyMi0xMC0wMSAwODoyNjozNA|d59fbd286f036597699ba3a8d79c4181287bcd6f; pt-dm=v1x9lchgnksm1nAOS%3A%20home%2Fshop_iphone%2Ffamily%2Fiphone_13%2Fselectraos:shop
If-None-Match: "a7349f27cad87d618a6c10fbd82eaad0"
If-Modified-Since: Sun, 02 Oct 2022 03:17:46 GMT

HTTP/1.1 200 OK
Server: Apple
Content-Type: text/html;charset=utf-8
Content-Length: 379106
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Security-Policy: frame-ancestors 'none'
X-XSS-Protection: 1; mode=block
Content-Language: zh-CN
ETag: "5a50f80eb10bd32e927e768b4b8bff31"
Last-Modified: Sun, 02 Oct 2022 03:23:15 GMT
x-request-id: 6961e1ed-b57f-47a2-85dd-6a70e5cc2bd5
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Content-Security-Policy: frame-ancestors 'none'
x-shred: 3299114458beebd49fd99865976b3c51
Cache-Control: private, max-age=43
Expires: Sun, 02 Oct 2022 03:29:53 GMT
Date: Sun, 02 Oct 2022 03:29:10 GMT
X-Cache: TCP_IMS_HIT from a222-138-5-94.deploy.akamaitechnologies.com (AkamaiGHost/10.9.5-44356082) (-)
Connection: keep-alive
Vary: Accept-Encoding

请求代码如下

如抓取到如下所有cookie呢

辛苦大家了。请大家帮我想想办法,希望国庆期间能抢到iphone给老婆交差,祝大家国庆愉快。

.net_樊的主页 .net_樊 | 初学一级 | 园豆:169
提问于:2022-10-02 12:39
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册