I\'ve been playing with beautiful soup and parsing web pages for a few days. I have been using a line of code which has been my saviour in all the scripts that I write. The
With urllib3 :
import urllib3 http = urllib3.PoolManager() myHeaders = urllib3.util.make_headers(basic_auth='my_username:my_password') http.request('GET', 'http://example.org', headers=myHeaders)