Instead of doing that I guess we are better off using session = requests.Session() and then requesting all web pages through session. Once cookies are set up for session they persistent across requests.
Also, line 47 is ugly lol. You can put a space after "if" as far as I know. And the first parenthesis is not needed anyway.
Last thing: I think we should go the curl way and put some kind of --http-basic flag to enable authentication and also put additional parameters for username and password. This makes the code cleaner and easier to understand imho.
Instead of doing that I guess we are better off using
session = requests.Session()
and then requesting all web pages throughsession
. Once cookies are set up forsession
they persistent across requests.The same should happend for Http Auth I guess.
Also, line 47 is ugly lol. You can put a space after "if" as far as I know. And the first parenthesis is not needed anyway.
Last thing: I think we should go the
curl
way and put some kind of--http-basic
flag to enable authentication and also put additional parameters for username and password. This makes the code cleaner and easier to understand imho.