Python学习
50个Pandas高级操作
盘点66个Pandas函数,轻松搞定“数据清洗”!
Python操作Mysql
学习 python requests模块
python怎么用Google AI
Python 连接 redis
本文档使用 MrDoc 发布
-
+
首页
学习 python requests模块
## 以下是一些关于学习 Python requests 模块的文章推荐: ``` Python 爬虫基础入门篇——Requests模块:这篇文章详细介绍了 requests 模块的基础知识,包括模块简介、安装、请求类型、请求参数等内容1。 https://www.bing.com/search?q=%E5%AD%A6%E4%B9%A0+python+requests%E6%A8%A1%E5%9D%97+%E6%96%87%E7%AB%A0&toWww=1&redig=78B1EE43E65D46BAA8BCB91FC16BAE45 快速上手 — Requests 2.18.1 文档:这是 requests 官方文档的快速上手指南,包括如何发送请求、传递 URL 参数、响应内容、JSON 响应内容等内容2。 https://requests.readthedocs.io/projects/cn/zh-cn/latest/user/quickstart.html Python - requests库 学习笔记(持续更新):这篇文章是作者的 requests 学习笔记,会持续更新3。 https://blog.csdn.net/Python_222/article/details/131272156 python爬虫教程:requests模块用法:这篇文章深入介绍了 requests 模块的使用,包括基础使用、请求结构、请求方法、自定义请求头、请求参数、会话和 Session、代理、SSL 验证、文件上传、重定向等方面4。 https://blog.csdn.net/Python_222/article/details/131272156 python爬虫库之Requests:这篇文章介绍了 requests 库的特性和基本使用方式5。 https://zhuanlan.zhihu.com/p/638713998 ``` ## 笔记: 1. 接口调用: ```python import requests import json #营销平台地址: yxpthost="http://172.20.34.113:6092" #接口平台地址: jkpthost="http://172.20.34.23:8080" #客户群接口: khqurl=yxpthost+"/ngmkcontrol_hn/ws/interface/queryCustomerGroups" headers ={ "Content-Type":"application/json", "X-Channel-Id":"ngcrmpf_hn", "X-Trans-Id":"ngcrmpf_hn20210427155304542651104", "X-Forwarded-For":"127.0.0.1" } body ={ "params": { "channel":"CIN1008600003", "userMobile":"15200539699" } } r=requests.post(khqurl, headers=headers, json=body) print(r.url) print(r.status_code) r.json() ``` 2.接口调用: ```python #接口平台宽综预约回复接口办理 kzyyhfurl=jkpthost+"/ngcrmpfcore_hn/csf/hn/nmopp/receiveBookingResult" headers={ "X-Channel-Id" : "nglocal_hn", "X-Trans-Id" : "nglocal_hn20200921110736418558896", "Content-Type" : "application/json" } body = { "params": { "iSHandAdr":"1", "comments":"预约成功", "changeReason": "", "newHouseId": "", "username": "", "startTime":"2023-11-14 14:00:00", "operateTime": "2023-11-14 10:10:10", "visitTime": "2023-11-14 18:00:00", "account": "730X23486612", "crmNo": "3023111036815446", "handlerName": "吴小提", "handler": "OP22195", "communityId": "-539691280", "customerPhone": "15074027684", "custAddr":"" } } r=requests.post(kzyyhfurl, headers=headers, json=body) print(r.url) r.json() ```
dz
2023年11月21日 17:09
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码