用pycharm写报错
python3里面的urlib模块没有这个urlencode方法,可以采用request是模块,不需要编码
import requests url = "https://www.baidu.com" data = {'name':'zzz', 'passwd':'123'} requests.get(url, params=data) requests.post(url,data=data)