会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小白龙白龙马
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
154
155
156
157
158
159
160
161
162
···
204
下一页
2020年2月24日
python+requests——高级用法——处理cookie——重点
摘要: 参考网址:https://www.cnblogs.com/xiaobaibailongma/p/12346091.html import requests url = 'http://www.baidu.com' resp = requests.get(url) print(resp.cookies
阅读全文
posted @ 2020-02-24 00:25 小白龙白龙马
阅读(594)
评论(0)
推荐(0)
2020年2月23日
python+requests——高级用法——上传文件
摘要: import requests url = 'http://httpbin.org/post' wj = {'file':open('C:\\Users\\del\\Desktop\\新建文件夹\\1.jpg','rb')} resp = requests.post(url,files = wj)
阅读全文
posted @ 2020-02-23 23:52 小白龙白龙马
阅读(1570)
评论(0)
推荐(0)
python+requests—— 0Auth摘要式身份认证 —— 自定义身份认证
摘要:
阅读全文
posted @ 2020-02-23 23:19 小白龙白龙马
阅读(434)
评论(0)
推荐(0)
python+requests——http digest auth摘要式身份认证
摘要: import requests from requests.auth import HTTPDigestAuth url = 'https://httpbin.org/digest-auth/auth/user/pass' resp = requests.get(url,auth=HTTPDiges
阅读全文
posted @ 2020-02-23 22:58 小白龙白龙马
阅读(3788)
评论(0)
推荐(1)
python+requests——http basic auth认证
摘要: import requests from requests.auth import HTTPBasicAuth url = 'https://api.github.com/uesr' resp = requests.get(url,auth=HTTPBasicAuth('user','passwor
阅读全文
posted @ 2020-02-23 22:50 小白龙白龙马
阅读(15502)
评论(0)
推荐(2)
python+requests——读取二进制文件并保存在本地——一个视频文件作为示例
摘要: import requests url = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4' resp = requests.get(url) with open('C:\\Users\\del\\Desktop\\新建文件夹\\3.mp4','
阅读全文
posted @ 2020-02-23 20:44 小白龙白龙马
阅读(1598)
评论(0)
推荐(0)
python+requests——读取二进制文件并保存在本地——一个应用程序作为示例
摘要: import requests url = 'https://www.python.org/ftp/python/3.8.1/python-3.8.1.exe' resp = requests.get(url) with open('C:\\Users\\del\\Desktop\\新建文件夹\\2
阅读全文
posted @ 2020-02-23 19:57 小白龙白龙马
阅读(2074)
评论(0)
推荐(0)
python+requests——读取二进制文件并保存在本地——一个图片作为示例
摘要: import requests url = 'https://upload-images.jianshu.io/upload_images/13614258-ba7bc15bccab5c63.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240
阅读全文
posted @ 2020-02-23 19:43 小白龙白龙马
阅读(1430)
评论(0)
推荐(0)
python+requests——检查响应头是否存在
摘要: import requests resp = requests.get('http://httpbin.org/get') print(type(resp.headers)) print(resp.headers['Content-Type']) actual_headers = {} for k,
阅读全文
posted @ 2020-02-23 19:23 小白龙白龙马
阅读(706)
评论(0)
推荐(0)
python+requests——URL的编码和解码
摘要: from urllib.parse import quote,unquote d = {'lang':'python','type':'testing','ccountry':quote('中国')} print(d) #执行结果:{'lang': 'python', 'type': 'testin
阅读全文
posted @ 2020-02-23 19:05 小白龙白龙马
阅读(4122)
评论(0)
推荐(0)
上一页
1
···
154
155
156
157
158
159
160
161
162
···
204
下一页