如果 curl 代码如下:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
curl_setopt($ch, CURLOPT_COOKIE, 'id='.$id);
$result = curl_exec($ch);
因为这个对我不起作用
id="j4156f9150ece727e38bbf982634ee"
cookie = {'id': id}
content = requests.post(url, cookies=cookie)
print(id)
print(cookie)
print(content.url)
print(content.cookies)
结果是:
['j4156f9150ece727e38bbf982634ee']
{'id': 'j4156f9150ece727e38bbf982634ee'}
http://example.com
<<class 'requests.cookies.RequestsCookieJar'>[]>
什么意思?