I would like to implement what is shown here:
Login to website using urllib2 - Python 2.7
My question is why is cookielib and cookiejar needed in the code? Why will the code not work without cookielib and cookiejar?
Thank you.
When you log in to a website, they usually give you a "cookie". When you load another page from the same site, you can show them this cookie to let them know who you are.
The cookie jar is a data structure that manages this for you.
Without it, you could not stay logged in.