Python Requests .jsp Website Login -


i've read through similar threads on this, feeling it's website specific problem.

i trying use requests session login website:

https://clients.ensofinancial.com/login.jsp

here code:

login_url = 'https://clients.ensofinancial.com/login.jsp' url = 'https://clients.ensofinancial.com/index.jsp#client-datainsight-wrapper'  s = requests.session()  r = s.get(login_url) tree = html.fromstring(r.text) token = list(set(tree.xpath("//input[@name='_csrf']/@value")))[0]  payload = {'val1':user,'val2':pw,'_csrf':token,'val4':'text'}  p = s.post(login_url,data=payload,headers=dict(referer=login_url))  r = s.get(url,headers=dict(referer=url)) 

i fear may missing website itself, perhaps i'm not passing in enough in payload? in case, p.status_code 200, , r.status_code 200.

both return me html & js of login page.

thanks help!


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -