Fork自 inscode / Python
import requests # 发送请求 url="https://nba.hupu.com/stats/players" headers={'User-Agent':"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48"} resp=requests.get(url=url,headers=headers) # 处理结果 print(resp.text) # 解析响应数据 # 是否保存