Python请求模块可以跟随元刷新标记吗?
我检查了http://docs.python-requests.org/en/master/user/quickstart/#redirection-and-history,但找不到具体的内容。
我尝试过:
import requests
data = requests.get('https://stackoverflow.com/', allow_redirects=True)
print(data.text)
但是它只能应用于服务器端重定向(301、302等)。
顺便说一下,这只是一个例子。堆栈溢出可能不使用此机制。
标签看起来像:
<html><head><meta http-equiv="refresh" content="0; url=/webapps/login/" /></head></html>