例:自動ログインの引き出しの新しいホットリスト

response.cookies)が(再びget_dict対象である辞書を返します

一度クッキーのアクセスを持ってするにはログイン

取得し、ポストは、クッキーです

 

インポート要求
post_dict = {
     " 電話"' 8615131255089 ' ' パスワード'' woshiniba ' ' oneMonth ':1 
} 
応答 = requests.post(
    URL = " http://dig.chouti.com/login " 
    データ = post_dict 
プリント(response.text)
cookie_dict = response.cookies.get_dict()
 印刷(cookie_dict)

応答 = requests.get(
    URL = ' http://dig.chouti.com/profile ' 
    クッキー = cookie_dict 
プリント(response.text)
s2.py

 

おすすめ

転載: www.cnblogs.com/jintian/p/11391995.html