fix
This commit is contained in:
parent
1473014aca
commit
1246f6a4b2
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user