Python requests with login credentials
问题 I am trying to login to a URL & download the content then parse, the URL needs username & password to login. using below gives below errors: import requests url = 'https://test/acx/databaseUsage.jssp?object=all' values = {'username': 'test_user', 'password': 'test_pswd'} headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} r = requests.post(url, data=values, headers=headers) print r.content Error