After sending request to the server
br.open('http://xxxx')
br.select_form(nr=0)
br.form['MESSAGE'] = '1 2 3 4 5'
br.submit()
I get the response title, which has set-cookie
Set-Cookie: PON=xxx.xxx.xxx.111; expires=Tue, 17-Mar-2015 00:00:00 GMT; path=/
Because mechanize seems to be not able to remember the cookie, so I want to set cookie for br. How can I do it?
cj = mechanize....?
br.set_cookiejar(cj)
I have no idea. Please help
I think that this should do what you want:
you can also add a preexisting cookie manually with the addheaders method from mechanize's browser class.