Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. from urllib.request import urlopen,Request
  2.  
  3. req = Request("http://namemc.com/?s"+"waudy12345", headers={'User-Agent': 'Mozilla/5.0'})
  4.  
  5.  
  6.  
  7. webpage = urlopen(req).read()
  8. webpage = webpage.decode('utf-8')
  9. print(webpage)
  10.  
  11. if 'Available' in webpage:
  12.     print("success")
  13. else:
  14.     print("Failure")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement