随笔 - 134  文章 - 0  评论 - 0  阅读 - 42858
01 2024 档案
Python redis异常(104, Connection reset by peer)
摘要:# 当python使用redis库连接和使用redis数据库时,可能会偶尔发生标题中的错误。这种操作并不是每次都会发生,而是偶发的,并且重试可以解决。# 为了连接使用更稳定简单,在redis 3.3.x后,redis库作者为redis客户端添加了一个health_check_interval参数,用 阅读全文
posted @ 2024-01-22 09:23 CJTARRR 阅读(457) 评论(0) 推荐(0) 编辑
通过requests请求查看出网ip
摘要:用requests请求一下网址均可: http://jsonip.com http://httpbin.org/get 阅读全文
posted @ 2024-01-02 17:23 CJTARRR 阅读(52) 评论(0) 推荐(0) 编辑
Python importlib简单使用
摘要:Python importlib简单使用 查看包/文件是否存在 from importlib import util​spec = util.find_spec("xxx.xxx.xxx") # 填目标包/文件的引用路径if not spec: print("没有找到相关的包/文件") 导入包/文件 阅读全文
posted @ 2024-01-02 17:07 CJTARRR 阅读(79) 评论(0) 推荐(0) 编辑
python设置全局socks5代理
摘要:python设置全局socks5代理 安装pysocks pip install pysocks 实现方法 import socksimport socket​​def up_global_proxy(host: str, port: int, username: str=None, passwor 阅读全文
posted @ 2024-01-02 11:55 CJTARRR 阅读(781) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示