import requests params = {'username':'Ryan','password':'password'} r = requests.post("http://pythonscraping.com/pages/cookies/welcome.php",params) # 向欢迎页面发送一个登录参数 print("Cookie is set to") print(r.cookies.get_dict()) print('----------') print("going to profile page.....") r = requests.get("http://pythonscraping.com/pages/cookies/profile.php",cookies = r.cookies) # 通过cookies 参数把cookie 发送到简介页面 print(r.text)
by: 发表于:2017-09-19 09:42:21 顶(0) | 踩(0) 回复
??
回复评论