获取您的
Python 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
import requests url = 'https://w3schools.com/python/demopage.php' #Sometimes the server redirects a request, could be if the file does not exist etc., set the 'allow_redirects' parameter to False to deny redirects: x = requests.delete(url, allow_redirects=False) #print the response text (the content of the requested file): print(x.text)
<head><title>文档已移动</title></head>
<body><h1>对象已移动</h1> 此文档可在 <a HREF="https://w3schools.org.cn/python/demopoage.php">此处</a> 找到。</body>