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