This commit is contained in:
caiwx86 2022-12-17 00:49:54 +08:00
parent 1473014aca
commit 1246f6a4b2

View File

@ -42,6 +42,7 @@ class htmlUtils:
continue
else:
ntfy.sendMsg(f"fail 请求失败:{curl}")
exit()
break
if type == "None":
data = { curl : url_text}
@ -55,7 +56,7 @@ class htmlUtils:
@classmethod
def getJSON(cls,curl):
count = 0
while count < 5:
if count < 5:
try:
res = requests.get(curl, headers=cls.headers, timeout=180)
data_json = res.json()
@ -65,7 +66,9 @@ class htmlUtils:
count += 1
time.sleep(1)
cls.getJSON(curl)
else:
exit()
@classmethod
def xpathData(cls,c_xpath,url=None,num=None,not_eq=None):
if url == None: