代码示例:(标识:python_requests_get_url)
python_requests_get_url.py
import requests

#the required first parameter of the 'get' method is the 'url':
x = requests.get('https://www.sou-xun.com/demo/pythondemo.html')

#print the response text (the content of the requested file):
print(x.text)
运行结果: