[英]how do i use curl command in my python script
我在終端中使用以下命令,它工作正常,現在我想獲得與終端相同的結果。所以我如何使用 python 腳本來做到這一點。 actually i need to get the cookies and the curl command give me all cookies values those i needed,therefore its up best solution for me,so now i want to use it in python script
CURL 命令:
curl -i -X PUT https://www.snipes.it
使用 requests.get() 或 requests.post() 進行 CURL 請求
調用 requests.get(url) 和 requests.post(url, data, headers) 以發出 curl 請求或任何 web 請求。 url 是指定端點的 url,data 是要發送的有效負載,並且 headers 應該包含請求的任何相關 headers。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.