You've already forked XiguaLiveDanmakuHelper
添加超时
This commit is contained in:
2
api.py
2
api.py
@ -99,6 +99,8 @@ class XiGuaLiveApi:
|
||||
return None
|
||||
|
||||
def postJson(self, url, data, **kwargs):
|
||||
if "timeout" not in kwargs:
|
||||
kwargs["timeout"] = 10
|
||||
try:
|
||||
p = self.s.post(url, data, **kwargs)
|
||||
except Exception as e:
|
||||
|
Reference in New Issue
Block a user