作者tree581 (talltree)
看板Python
标题如何取值 restful
时间Thu Mar 29 20:40:58 2018
我的url直接访问会秀出
[{"a":"aa","b":"bb"},
{"a":"ac","b":"bc"}]
期望结果
我的程式码
import requests
r=requests.get(‘
https://url?parm‘, auth=(‘username‘, ‘password‘),verify=Fa
lse)
print(r.text)
print出来却是一堆html,然後我把html拿出来run一下,发现却是登入页面。
表示说可能他没作login动作?
有大大能指点一下吗?
期望列印
[{"a":"aa","b":"bb"},
{"a":"ac","b":"bc"}]
感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 117.136.8.121
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1522327260.A.511.html
1F:→ djshen: 没人知道你用什麽authentication方法 03/29 21:24
2F:→ kenduest: 而且还删除前面发问张贴文章..... 03/29 22:48
3F:嘘 TakiDog: 跳登入就没登入 所以要登入 03/30 16:40
4F:→ TakiDog: 还有 做啦乾 03/30 16:41