Obtain Web Page : HTTP Request : Network PYTHON TUTORIALS


PYTHON TUTORIALS » Network » HTTP Request »

 

Obtain Web Page


import sys, urllib2

req = urllib2.Request(sys.argv[1])
fd = urllib2.urlopen(req)
while 1:
    data = fd.read(1024)
    if not len(data):
        break
    sys.stdout.write(data)



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Network
» HTTP Request