This commit is contained in:
caiwx86 2023-01-10 07:27:26 +08:00
parent 5b6889cd8e
commit 7ba4b82acd

View File

@ -51,7 +51,7 @@ class htmlUtils:
print()
@classmethod
def getHTML(cls, curl,type=None,update=False):
def getHTML(cls, curl,type=None):
url_text = None
retries = Retry(total=1,
backoff_factor=0.1,
@ -61,8 +61,10 @@ class htmlUtils:
s.mount('https://', HTTPAdapter(max_retries=retries))
count = 1
#数据为空则获取数据
if not update:
try:
url_text = cls.getPathSaveHtml(curl,"read")
except:
url_text = None
if url_text != None:
return html.fromstring(url_text)
while url_text == None: