Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get requests response code with python

# plz suscribe to my youtube channel -->
# https://www.youtube.com/channel/UC-sfqidn2fKZslHWnm5qe-A

import urllib.request
import time
def result_from_site(url_of_site):
    weburl = urllib.request.urlopen(url_of_site)
    return str(weburl.getcode())
print(result_from_site("https://www.linkedin.com/learning/learning-python/fetching-internet-data"))
 
PREVIOUS NEXT
Tagged: #requests #response #code #python
ADD COMMENT
Topic
Name
8+5 =