download - Python urllib urllib2 keeping sessions -


iam trying find way how keep cookie sessions while performing urllib command download files. here have far.

            session.get(url, data=login_data, verify=false)              f = urllib2.urlopen(url)             data = f.read()             open('c:/files/filename.docx', "wb") code:                 code.write(data) 

url url data login details username , password

so when run this, no success.

does have experience that?


Comments

Popular posts from this blog

c# - HttpResponseMessage System.InvalidOperationException -

sql - Postgresql error: "failed to find conversion function from unknown to text" -