我無法理解請求。 比方說,我有這樣的要求:用Python發送請求(用Burp截獲)
POST /user/follow HTTP/1.1
Host: www.website.com
User-Agent: some user agent
Accept: application/json, text/plain, */*
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Referer: https://www.website.com/users/12345/profile
Content-Type: application/json;charset=utf-8
X-CSRF-TOKEN: Ab1/2cde3fGH
Content-Length: 27
Cookie: some-cookie=;
DNT: 1
Connection: close
{"targetUser":"12345"}
我怎樣使用這些信息來發送使用python有效的請求? 我發現並不是很有幫助。我需要有人向我展示我給你的數據。
那麼,Content-Length不能是一個字符串? (「27」) – David
我會保持它作爲整數,但一個字符串是好的。 – apoorlydrawnape
python錯誤只是告訴我它必須是一個字符串。無論如何,它似乎像網站有一些cookie存儲一些東西,如時間/日期和會話令牌,最有可能防止botting ...這將是艱難的。 – David