某 url 重定向

语言 python

headers = {
        'Accept': '*/*',
        'Connection': 'keep-alive',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36'
    }
try:
    resp = requests.get(url="", headers=http_headers, timeout=10)
except Exception as e:
    continue
print("resp", resp.url)

猜你喜欢

转载自blog.csdn.net/weixin_42131208/article/details/128143366