2017/11/22 - I see you're using requests. The syntax for logging in to a site is as follows: import requests page = requests.get("http://localhost:8080/login?from=%2F", auth= ('username', 'password')). Hope this helps! You can read more .