fix
This commit is contained in:
+5
-2
@@ -75,8 +75,11 @@ class htmlUtils:
|
||||
url_text = res
|
||||
if type == "json":
|
||||
#url_text = res.json()
|
||||
cls.saveHtml(curl,res.text)
|
||||
return json.loads(res.text)
|
||||
try:
|
||||
cls.saveHtml(curl,res.text)
|
||||
return json.loads(res.text)
|
||||
except:
|
||||
return None
|
||||
if type == None:
|
||||
url_text = html.fromstring(res.text)
|
||||
cls.saveHtml(curl,res.text)
|
||||
|
||||
Reference in New Issue
Block a user