01 2024 档案
摘要:# 当python使用redis库连接和使用redis数据库时,可能会偶尔发生标题中的错误。这种操作并不是每次都会发生,而是偶发的,并且重试可以解决。# 为了连接使用更稳定简单,在redis 3.3.x后,redis库作者为redis客户端添加了一个health_check_interval参数,用
阅读全文
摘要:用requests请求一下网址均可: http://jsonip.com http://httpbin.org/get
阅读全文
摘要:Python importlib简单使用 查看包/文件是否存在 from importlib import utilspec = util.find_spec("xxx.xxx.xxx") # 填目标包/文件的引用路径if not spec: print("没有找到相关的包/文件") 导入包/文件
阅读全文
摘要:安装pysocks pip install pysocks 挂载/卸载代理方法 import socksimport socketdef up_global_proxy(host: str, port: int, username: str=None, password :str=None):
阅读全文
浙公网安备 33010602011771号