1

So say we needed to use authentication before we can actually access the web then:

import urllib2, base64
authenip = "10.203.10.12" #What ever the authenication ip is....
req = urllib2.Request("http://" + authenip)
base64string = base64.encodestring("username:password").replace("\n", "")
req.add_header("Authorization", "Basic %s" % base64string)
requested = urllib2.urlopen(req)

Alright but from here since we have now logged in, how do we go to a website?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
user3818650
  • 581
  • 1
  • 7
  • 19

0 Answers0