首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Niko的小窝

    Python-Requests

    本教程使用Python语言,需提前安装Pip3 or Pip,例如Linux类的,请在命令行内输入:

    49610编辑于 2022-03-29
  • 来自专栏正则

    Python-requests模块

    前言一、requests模块使用1.1 requests模块发送get请求1.2 response响应对象1.3 response.text与response.content的区别1.4 通过对response.content进行decode,来解决中文乱码1.5 response响应对象的其他常用的属性和方法二、requests模块发送请求2.1 发送带headers的请求2.1.1思考2.1.2 携带请求头发送请求的方法2.2 发送带参数的请求2.2.1 在url携带参数2.2.2 通过params携带参数字典2.3 在headers参数中携带cookie2.3.1 github登录抓包分析3.3.2 完成代码2.4 cookie参数的使用2.5 cookiejar对象转换为cookies字典的方法2.6 超时timeout的使用2.7 代理proxies的使用2.7.1 理解使用代理的过程2.7.2正向代理和反向代理2.7.3 代理IP(代理服务器)的分类2.7.4 proxies代理参数的使用2.8 使用verify参数忽略CA证书三、 requests模块发送post请求3.1 requests发送post请求的方法四、利用requests.session进行状态保持4.1 requests.session的作用及应用场景4.2 requests.session的使用方法4.3 实例:模拟登录github精彩链接最后

    67140发布于 2021-11-01
  • 来自专栏cjz的专栏

    Python-Requests模块详解

    Requests模块是Python中最简单易用的HTTP客户端库,可以极大简化发送HTTP请求的代码

    90420编辑于 2023-10-11
  • 来自专栏正则

    Python-requests模块学习笔记总结

    前言一、requests模块使用1.1 requests模块发送get请求1.2 response响应对象1.3 response.text与response.content的区别1.4 通过对response.content进行decode,来解决中文乱码1.5 response响应对象的其他常用的属性和方法二、requests模块发送请求2.1 发送带headers的请求2.1.1思考2.1.2 携带请求头发送请求的方法2.2 发送带参数的请求2.2.1 在url携带参数2.2.2 通过params携带参数字典2.3 在headers参数中携带cookie2.3.1 github登录抓包分析3.3.2 完成代码2.4 cookie参数的使用2.5 cookiejar对象转换为cookies字典的方法2.6 超时timeout的使用2.7 代理proxies的使用2.7.1 理解使用代理的过程2.7.2正向代理和反向代理2.7.3 代理IP(代理服务器)的分类2.7.4 proxies代理参数的使用2.8 使用verify参数忽略CA证书三、 requests模块发送post请求3.1 requests发送post请求的方法四、利用requests.session进行状态保持4.1 requests.session的作用及应用场景4.2 requests.session的使用方法4.3 实例:模拟登录github精彩链接最后

    1K30发布于 2021-09-07
  • 来自专栏软测小生

    Python-Requests库进阶用法——timeouts, retries, hooks

    https://www.google.com/") # Output 输出信息 send: b'GET / HTTP/1.1\r\nHost: www.google.com\r\nUser-Agent: python-requests User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" }) 总结: 以上就是Python-Requests

    3.9K20发布于 2021-08-06
  • 来自专栏SDNLAB

    使用Python-Requests实现ODL对OVS的流表下发

    目标 通过ODL,在OVS上添加如下的一个group # ovs-vsctl add-br br0 # ovs-vsctl set bridge br0 protocols=OpenFlow13 # ovs-ofctl dump-groups br0 -O openflow13 OFPST_GROUP_DESC reply (OF1.3) (xid=0x2): group_id=1,type=all,bucket=weight:0,set_field:00:00:00:00:00:05->eth_d

    1.9K50发布于 2018-03-29
  • 来自专栏0x7c00的专栏

    Python(十三)

    /*", # "Accept-Encoding": "gzip, deflate", # "Host": "httpbin.org", # "User-Agent": "python-requests /*", # "Accept-Encoding": "gzip, deflate", # "Host": "httpbin.org", # "User-Agent": "python-requests /*", # "Accept-Encoding": "gzip, deflate", # "Host": "httpbin.org", # "User-Agent": "python-requests headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Host': 'httpbin.org', 'User-Agent': 'python-requests "gzip, deflate", # "Content-Length": "3", # "Host": "httpbin.org", # "User-Agent": "python-requests

    42620发布于 2021-11-01
  • 来自专栏软件测试架构师俱乐部

    Python接口测试之requests详解

    Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Host": "httpbin.org", "User-Agent": "python-requests Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Host": "httpbin.org", "User-Agent": "python-requests "Content-Type": "application/x-www-form-urlencoded", "Host": "httpbin.org", "User-Agent": "python-requests

    51910发布于 2020-02-19
  • 来自专栏从零开始学自动化测试

    httprunner 3.x学习8 - variables变量声明与引用

    method: POST headers: Content-Type: application/json User-Agent: python-requests method: GET headers: Content-Type: application/json User-Agent: python-requests **{ "Content-Type": "application/json", "User-Agent": "python-requests **{ "Content-Type": "application/json", "User-Agent": "python-requests

    1K30发布于 2021-06-24
  • 来自专栏从零开始学自动化测试

    httprunner学习12-hook机制

    method: GET headers: Content-Type: application/json User-Agent: python-requests method: GET headers: Content-Type: application/json User-Agent: python-requests method: GET headers: Content-Type: application/json User-Agent: python-requests method: GET headers: Content-Type: application/json User-Agent: python-requests

    1K10发布于 2019-09-29
  • 来自专栏计算机视觉理论及其实现

    python的requests库

    23","Content-Type": "application/x-www-form-urlencoded","Host": "http://httpbin.org","User-Agent": "python-requests Accept-Encoding": "gzip, deflate","Content-Length": "16","Host": "http://httpbin.org","User-Agent": "python-requests headers": {"Accept": "*/*","Accept-Encoding": "gzip, deflate","Host": "http://httpbin.org","User-Agent": "python-requests headers": {"Accept": "*/*","Accept-Encoding": "gzip, deflate","Host": "http://httpbin.org","User-Agent": "python-requests headers": {"Accept": "*/*","Accept-Encoding": "gzip, deflate","Host": "http://httpbin.org","User-Agent": "python-requests

    1.2K51编辑于 2022-09-03
  • 来自专栏初代庄主

    requests.post 方法 json 和 data 参数的区别

    '8', 'Content-Type': 'application/x-www-form-urlencoded', 'Host': '127.0.0.1:8000', 'User-Agent': 'python-requests Content-Length': '15', 'Content-Type': 'application/json', 'Host': '127.0.0.1:8000', 'User-Agent': 'python-requests

    90510编辑于 2022-12-19
  • 来自专栏从零开始学自动化测试

    httprunner 3.x学习13 - hook 机制

    method: POST headers: Content-Type: application/json User-Agent: python-requests **{ "Content-Type": "application/json", "User-Agent": "python-requests method: POST headers: Content-Type: application/json User-Agent: python-requests **{ "Content-Type": "application/json", "User-Agent": "python-requests ==== method : POST url : http://127.0.0.1:8000/api/v1/login/ headers : { "User-Agent": "python-requests

    1.4K30发布于 2021-06-24
  • 来自专栏全栈程序员必看

    Python之json文件

    '*/*', 'Accept-Encoding': 'gzip, deflate onnection': 'close', 'Host': 'httpbin.org', 'User-Agent': 'python-requests '*/*', 'Accept-Encoding': 'gzip, deflate', 'Connection': se', 'Host': 'httpbin.org', 'User-Agent': 'python-requests

    98020编辑于 2021-12-19
  • 来自专栏R0A1NG 技术分享

    Python urllib CRLF 注入(CVE-2019-9740)

    ' resp=urllib.request.urlopen(url) print(resp.read()) 抓包 GET / HTTP/1.1 Host: 127.0.0.1 User-Agent: python-requests TT: wwwww HTTP/1.1 Host: 127.0.0.1 User-Agent: python-requests/2.22.0 Accept-Encoding: gzip, deflate

    1.2K20编辑于 2022-03-07
  • 来自专栏从零开始学自动化测试

    pytest文档72- 使用 template 替换 yaml 文件的变量

    method: POST headers: Content-Type: application/json User-Agent: python-requests method: POST headers: Content-Type: application/json User-Agent: python-requests 'headers': { 'Content-Type': 'application/json', 'User-Agent': 'python-requests

    4.1K10发布于 2020-12-17
  • 来自专栏从零开始学自动化测试

    httprunner 3.x学习4 - 测试用例参数关联(export)

    method: POST headers: Content-Type: application/json User-Agent: python-requests method: GET headers: Content-Type: application/json User-Agent: python-requests **{ "Content-Type": "application/json", "User-Agent": "python-requests **{ "Content-Type": "application/json", "User-Agent": "python-requests

    1.5K10发布于 2021-06-24
  • 来自专栏一朵灼灼华的博客

    Nginx访问日志中UserAgent的一些参考建议

    、leiki、webmeup 等,所以我们可以通过UserAgent信息来屏蔽垃圾爬虫 nginx配置 将指定的userAgent返回403 if($http_user_agent ~* 'curl|python-requests http_user_agent $ban_ua { default ''; '~*MJ12bot|curl|NetcraftSurvey|Go-http-client|polaris botnet|python-requests

    1.7K10编辑于 2022-08-05
  • 来自专栏从零开始学自动化测试

    httprunner学习5-参数化与数据驱动

    http://127.0.0.1:8000/api/v1/login/ method: POST headers: Content-Type: application/json User-Agent: python-requests http://127.0.0.1:8000/api/v1/login/ method: POST headers: Content-Type: application/json User-Agent: python-requests http://127.0.0.1:8000/api/v1/login/ method: POST headers: Content-Type: application/json User-Agent: python-requests

    1.3K30发布于 2019-09-27
  • 来自专栏全栈测试开发日记

    Python 接口测试requests.post方法中data与json参数区别

    '26', 'Content-Type': 'application/x-www-form-urlencoded', 'Host': '127.0.0.1:8000', 'User-Agent': 'python-requests Content-Length': '39', 'Content-Type': 'application/json', 'Host': '127.0.0.1:8000', 'User-Agent': 'python-requests 111 {'Content-Length': '39', 'Content-Type': 'text/plain', 'Host': '127.0.0.1:8000', 'User-Agent': 'python-requests Content-Length': '49', 'Content-Type': 'application/json', 'Host': '127.0.0.1:8000', 'User-Agent': 'python-requests

    1.6K30编辑于 2023-02-02
领券