From ca818581b8c3449922ff1140acd94027aaf31445 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Mon, 9 Jan 2023 21:17:01 +0800 Subject: [PATCH] fix --- utils/HtmlUtils.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/utils/HtmlUtils.py b/utils/HtmlUtils.py index 40bd7a7..295d83a 100644 --- a/utils/HtmlUtils.py +++ b/utils/HtmlUtils.py @@ -98,14 +98,8 @@ class htmlUtils: @classmethod def getJSON(cls,url): - res = requests.get(url,headers=cls.headers, timeout=180) - if res.status_code != 200: - return None - try: - return json.loads(res.text) - except: - return None - + return cls.getHTML(url,type="json") + @classmethod def xpathData(cls,c_xpath,url=None,num=None,not_eq=None,update=False): if url == None: