You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
364 B

import urllib.request
gh_url = 'https://www.facebook.com'
auth_handler = urllib.request.HTTPBasicAuthHandler()
auth_handler.add_password(None, gh_url, 'patra.kailash@yahoo.com', 'jamesbond06')
opener = urllib.request.build_opener(auth_handler)
urllib.request.install_opener(opener)
handler = urllib.request.urlopen(gh_url)
print(handler.getcode())