Python website log in: BIG-IP can not find session information in the request -


i have written following code enter website through python programming. reason facing error:

**"your session not established.

big-ip can not find session information in request. can happen because browser restarted after add-on installed. if occurred, click link below continue. can happen because cookies disabled in browser. if so, enable cookies in browser , start new session."**

my code(website, username , password hidden):

import sys import re import requests import csv bs4 import beautifulsoup pprint import pprint  login_url = "https://example.ex.com"  requests.session() session:     proxy_url = "http://{0}:{1}@proxy.blah.blah.com:[portnumber]".format('proxy_uid', 'proxy_password')     session.proxies = {'http': proxy_url, 'https': proxy_url}     data = {         'username': '_uname_',         'password': '_password_',         'vhost': 'standard'     }     r = session.get(login_url)     print r.cookies     print r.headers     r1 = session.post(login_url+'/my.policy', data=data)     print r1.cookies     print r1.headers     print r1.reason     open("login.html", "w") f:         f.write(str(r1.content)) 

any appreciated!

when go website (f12-network etc), appears in response headers info?

there session cookie need collect first step (probably using request) , include cookie in own request headers when submit post request username , password.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -