From b38431bf4c3e7b69cc25ecdd26261df4a3d970e7 Mon Sep 17 00:00:00 2001 From: JerryYan <792602257@qq.com> Date: Sun, 12 Apr 2020 20:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.py b/api.py index e938bb4..e351cd1 100644 --- a/api.py +++ b/api.py @@ -76,6 +76,8 @@ class XiGuaLiveApi: self.roomPopularity = _data["data"]["popularity"] def getJson(self, url, **kwargs): + if "timeout" not in kwargs: + kwargs["timeout"] = 10 try: p = self.s.get(url, **kwargs) except Exception as e: