要使用
ISO8859-1编码才能正确输出中文
import requests
postUrl = 'http://pjb.ecust.edu.cn/pingce/login.php'
postData = {'action':'login',
'sno':'你的用户名',
'password':'你的密码'}
r = requests.Session()
r.post(postUrl, postData)
getUrl = 'http://pjb.ecust.edu.cn/pingce/list.php'
html = r.get(getUrl)
s = html.text.encode('ISO8859-1')
print s
2847

被折叠的 条评论
为什么被折叠?



