Obtain Web Page Information : GET POST : Network PYTHON TUTORIALS


PYTHON TUTORIALS » Network » GET POST »

 

Obtain Web Page Information


import sys, urllib2

req = urllib2.Request("http://www.google.com")
fd = urllib2.urlopen(req)
print "Retrieved", fd.geturl()
info = fd.info()
for key, value in info.items():
    print "%s = %s" (key, value)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Network
» GET POST