Skip to content Skip to sidebar Skip to footer

Can't Automate Login Using Python Mechanize (must "activate" Specific Browser)

I seem to have difficulty logging into a website, which requires browser authenticaton. What happens is when you first log on, the website redirects you to a page saying 'We have s

Solution 1:

If you want to save session, try to save cookies with save/load function. Example:

cj = cookielib.LWPCookieJar()
cj.save('cookies.txt', ignore_discard=False, ignore_expires=False)
...
cj.load('cookies.txt', ignore_discard=False, ignore_expires=False)

Post a Comment for "Can't Automate Login Using Python Mechanize (must "activate" Specific Browser)"