Python : Http request
import urllib.request
#pretty easy to read the http response code and to read the response data.
webrequest = urllib.request.urlopen('https://www.google.com')
print ("result code "+str(webrequest.getcode()))
data = webrequest.read();
print(data)
References:
https://www.guru99.com/accessing-internet-data-with-python.html
import urllib.request
#pretty easy to read the http response code and to read the response data.
webrequest = urllib.request.urlopen('https://www.google.com')
print ("result code "+str(webrequest.getcode()))
data = webrequest.read();
print(data)
References:
https://www.guru99.com/accessing-internet-data-with-python.html
No comments:
Post a Comment