This commit is contained in:
caiwx86 2023-01-09 21:17:01 +08:00
parent f99b37a66b
commit ca818581b8

View File

@ -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: