📜  如何使用 python 代码示例获取请求响应代码

📅  最后修改于: 2022-03-11 14:46:44.701000             🧑  作者: Mango

代码示例1
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"))