fix
This commit is contained in:
parent
45a846881e
commit
01d7fc10b9
@ -53,6 +53,7 @@ class htmlUtils:
|
||||
@classmethod
|
||||
def getHTML(cls, curl,type=None,update=False):
|
||||
url_text = None
|
||||
if update: cls.remove_HtmlCache(curl)
|
||||
retries = Retry(total=5, backoff_factor=0.1, status_forcelist=[ 500, 502, 503, 504 ])
|
||||
s = requests.Session()
|
||||
s.mount('http://', HTTPAdapter(max_retries=retries))
|
||||
@ -81,7 +82,7 @@ class htmlUtils:
|
||||
|
||||
@classmethod
|
||||
def getJSON(cls,url,update=False):
|
||||
return cls.getHTML(url,type="json")
|
||||
return cls.getHTML(url,type="json",update=update)
|
||||
|
||||
@classmethod
|
||||
def xpathData(cls,c_xpath,url=None,num=None,not_eq=None,update=False):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user