python - session error ? using POST using requests or urllib2 -



python - session error ? using POST using requests or urllib2 -

trying authenticate website , fill out form using requests lib

import requests payload = {"name":"someone", "password":"somepass", "submit":"submit"} s = requests.session() s.post("https://someurl.com", data=payload) next_payload = {"item1":"something", "item2":"something", "submit":"submit"} r = s.post("https://someurl.com", data=next_payload) print r.text

authentication works , verified can post forms 1 having problem gives the action not completed, perhaps because session had expired. please seek again attempted in urllib2 , same result -- dont think issue cookie. wondering if javascript on page has giving session error? other form page doesnt have javascripts.

thanks input...

python python-requests

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -