Can't login to website using python [requests, roboBrowser] -
i've been looking around week now. answers found either out of date or not working.
i'm trying login website http://ink361.com/app/login tried using requests alone , tried mixing requests robobrowser inject headers. don't have problem providing username , password testing purposes.
from robobrowser import robobrowser import requests headers = { "accept" : "application/json", "connection" : "keep-alive", "accept-encoding" : "gzip, deflate", "accept-language" : "en-us,en;q=0.5", "content-length" : "50", "content-type" : "application/x-www-form-urlencoded; charset=utf-8", "cookie" : '', "dnt" : '1', "host" : "ink361.com", "referer" : "http://ink361.com/app/login", "user-agent" : "mozilla/5.0 (macintosh; intel mac os x 10.12; rv:54.0) gecko/20100101 firefox/54.0", "x-request" : "json", "x-requested-with" : "xmlhttprequest" } s = requests.session() s.headers = headers browser = robobrowser(session=s,history=true) login_url = 'http://ink361.com/app/login' browser.open(login_url) forms = browser.get_forms() print(forms) i trying print forms in web page takes forever raises
remotedisconnected("remote end closed connection without" urllib3.exceptions.protocolerror: ('connection aborted.', remotedisconnected('remote end closed connection without response',)) the headers reason thing. tried without headers empty array forms. tried grabbing form
form = browser.get_form(class_='modern-form') print(form.fields) and fields empty..
Comments
Post a Comment