Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import urllib2
  2.  
  3. url = 'http://ides-1.prod1.prod.us-west-2.prod-wos.com:8080/ides/status/jdbc-connector-status.jsp'
  4. username = 'admin'
  5. password = 'pass'
  6. p = urllib2.HTTPPasswordMgrWithDefaultRealm()
  7.  
  8. p.add_password(None, url, username, password)
  9.  
  10. handler = urllib2.HTTPBasicAuthHandler(p)
  11. opener = urllib2.build_opener(handler)
  12. urllib2.install_opener(opener)
  13.  
  14. page = urllib2.urlopen(url).read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement