要一直走下去

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2021年1月14日

摘要: 基本方式一: r = requests.post('http://httpbin.org/post', files={'file': open('report.xls', 'rb')}) 方式二(带其他参数): import requests import json session = reques 阅读全文
posted @ 2021-01-14 09:38 要一直走下去 阅读(3204) 评论(0) 推荐(0) 编辑

摘要: 有时候,用requests.session()登录,获取不到cookie,要使用原始方式获取cookie: def login(self): ''' 登录正式环境 :return: ''' self._session = requests.session() url = "http://cdht-s 阅读全文
posted @ 2021-01-14 09:31 要一直走下去 阅读(1651) 评论(0) 推荐(0) 编辑