Requests Module For HTTP Requests
import requests
# This will get the source code of the url mentioned
r = requests.get("https://aryansonone1.blogspot.com/2020/09/blog-post.html")
print(r.text)
#This will give the status of the code
print(r.status_code)
# To post request to the server
# url = "www.something.com"
# data = {
# "p1":4,
# "p2":8
# }
# r2 = requests.post(url=url, data=data)
Comments
Post a Comment