- 首先领有 Python 环境
pip install requests
装置 Python 罕用的 requests 依赖库-
通过申请获取所需页面前端代码或者接口后果
page = requests.get(url="https://facebug555.com").text print(page) result = requests.get(url="https://facebug555.com").json() print(result)
-
通过 requests 发送文件
file_data = {'file': ('1.txt', 'xxxxxxx')} upload_result = requests.post( url='https://facebug555.com', files=file_data).json() print(upload_result)