摘要:
requests原生支持 import requests from requests.adapters import HTTPAdapter s = requests.Session() 重试次数为3 s.mount('http://', HTTPAdapter(max_retries=3)) s. 阅读全文
摘要:
使用json包 import json dict1 = {"A":"a","B":"b"} 转换为字符串 json.dumps(dict1) 结果为 '{"A": "a", "B": "b"}' 转换为字典 json.loads('{"A": "a", "B": "b"}') 结果为 {'A': ' 阅读全文