python3.x執行post請求時報錯「POST data should be bytes or an iterable of bytes...」的解決方法

使用python3.5.1執行post請求時,一直報錯"POST data should be bytes or an iterable of bytes. It cannot be of type str.",仔細對照教程後也未發現編寫方法沒有問題。   最後通過交流發現需要加在urlencode語句後加encode(encoding='UTF8')   params = urllib.pars
相關文章
相關標籤/搜索