gpt4 book ai didi

javascript - CURL JSESSIONID 问题

转载 作者:行者123 更新时间:2023-12-05 01:29:12 25 4
gpt4 key购买 nike

我在使用 CURL 获取网页时遇到了一些问题。我认为原因是我的 CURL 请求不包含 JSESSIONID 值。

这是我的 cookie 文件最后的样子:

direct.orange.co.il FALSE   /   FALSE   0   SMSESSIONMTySTv50SShcdl5y9C7TChWfGP5xbsW4P13QQLR6kkJyYtfVnx4q!574440962
bill4u.orange.co.il FALSE / FALSE 0 JSESSIONID 5rYLMT1QKTxTLhNTy0gkNGr4zGfhtlky9pxy20gHL1Ns65TgsCHy!-2121300565

是否说明有问题?

我的 CURL 请求只包含 SMSESSION 值而不包含 JSESSIONID 值。

这是我从实时标题中获得的请求:

JSESSIONID=MTdLyyl2yGV1GnQW1LwlLQHPz0gPg8nCFpzDRkhQY01fLpTGGWnh!574440962; __utma=242473949.127100127.1288950781.1288950781.1288957650.2; __utmc=242473949; __utmz=242473949.1288957650.2.2.utmcsr=bill4u.orange.co.il|utmccn=(referral)|utmcmd=referral|utmcct=/action/mainAction; SMSESSION=mBRV8XSGka1o+98JnH7GpRLhljlhw7x4Gc2Y/2JWi6Yp277F0EzTLW09i1WTy00A5z2cfPcwLVjpQxrhTKINrQ6lfjyatS3EOGe6Nz7RBvCwWpUEYAwXTwn9MqE0N+YzWU5Nb5MVXAke3jmYiTx7jYUXmiP9/3rvLaWetrlWCbI3gvWb979JC9Ae1dVYYXu4h8Zpdeo8hOIZc+lbMJ/hadI2aa2GHeymjhNrhVKKtyOlQkCS6enHvaT9D0Az/0pYiHv2R0LFSdM8QTBn7oTzkbJWEpLQKHel51sDDrSpyiQPLPQ1l1QPONSeO8Ik1wvpg8Pq7RG+Y2NosL9XiuQQscKJjO1oBZJkNCQE3u1wORC7/uid1Ur0XYOWUgT1EEj4xM55+QQQtdgVSTJaIT4odf8mB0J7R5sA5FqTQdqhOZ6VZkyyQXqMPHIfxyjIlSwqAeGec9IIz+7T+0NTwH6IOCCHXs3O98iXuZh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nymHuzNKFlsmCdcdSss0jE4aXZ44zedVcko1vx2m2Fo36/2WCae5zjzmkaWKJBwztqlWAl6HWFq1Ga8/IIUm+BRKJ7fUzvOrImImbDchKXFmB5Kbh2SfibaM1JZd2EjhnS1+D/1aMAitASJDSz4NihN53icSfzZ9agcbnr7vUCX6s9TxLiekjXxcOHQyzbrxH0CRQs+Ngq/Hxi4GtjCZgNpzUDWiDLTohaJmRVpNxta/e+uEjEphA578gqb1gdCIy8xnjpBw0dymAtLSb9Ypr+f5C4T4Q93H5vxRC9PZZpmlIcsbw+w3xfO+XWIgr5YFNP7mjovVNh4msOIdWWAHpjJML1GD1Ws/hwPfnO5qxEiUOdkbsozfsoGaHfp1gk4Vl/CTm37h3mbAnfT2W1yt1XTK3nGGD2YkjZbKhYL8PyoYCZDJaCFj8PixFyVcf43U9w/wAZDRznoy/yzvCsDy8FGKk1hTPSe9Fi8zcGnK86eQzLrK7wkcDKmyfxGyFZcoo3MfblnM4DCTlksYBlnIA+0GQtlf407zyMzXTIs01NeWOANUcl2IaXu1M3wiSIuCb1ocd8PUPNn2kgP5NT3yXB5qdzvkd/0tZVIuvA30ZY0jqfpwJxAgH99EBy3qCi+hO/1ipfVKtpAB31ArK5mN+Aapf6jx1+1LbLn9V5tzzppktkaGRLvTEOTBoEvguxwB163OMCw+Zjs7PGtVKSPsAHe2/kzp9STRPXn6tufhQvA9SwFLQdNWWhFBw6eqLsMoVVvFc1UV9IsjiLdpZddLR9t; JSESSIONID=MTySTv50SShcdl5y9C7TChWfGP5xbsW4P13QQLR6kkJyYtfVnx4q!574440962

希望这对您有所帮助。

编辑:当我点击新 url 时,JSESSIONID 值似乎正在运行中生成。

最佳答案

你检查过curl documentation了吗? (请参阅此处的第 10 节)

Curl has a full blown cookie parsing engine built-in that comes to use if you want to reconnect to a server and use cookies that were stored from a previous connection (or handicrafted manually to fool the server into believing you had a previous connection). To use previously stored cookies, you run curl like:

    curl --cookie stored_cookies_in_file http://www.cookiesite.com    

Curl's "cookie engine" gets enabled when you use the --cookie option. If you only want curl to understand received cookies, use --cookie with a file that doesn't exist. Example, if you want to let curl understand cookies from a page and follow a location (and thus possibly send back cookies it received), you can invoke it like:

    curl --cookie nada --location http://www.cookiesite.com    

Curl has the ability to read and write cookie files that use the same file format that Netscape and Mozilla do. It is a convenient way to share cookies between browsers and automatic scripts. The --cookie (-b) switch automatically detects if a given file is such a cookie file and parses it, and by using the --cookie-jar (-c) option you'll make curl write a new cookie file at the end of an operation:

    curl --cookie cookies.txt --cookie-jar newcookies.txt http://www.cookiesite.com

关于javascript - CURL JSESSIONID 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4105802/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com