主页
Python
Python Requests 请求模块
demo_requests_get_url
运行 ❯
×
更改方向
保存代码
更改主题
import requests #the required first parameter of the 'get' method is the 'url': x = requests.get('https://freew3c.com/python/demopage.htm') #print the response text (the content of the requested file): print(x.text)
<!DOCTYPE html>
<html>
<body>
<h1>This is a Test Page</h1>
</body>
</html>