参考代码
# coding:utf-8
import requests
url = "https://passport.cnblogs.com/user/signin" # 接口地址
# 消息头数据
headers = {
'Connection': 'keep-alive',
'Content-Length': '123',
'Cache-Control': 'max-age=0',
'Origin':'https://passport.youkuaiyun.com',
'Upgrade-Insecure-Requests':'1',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
'Accept': 'tex