fix
This commit is contained in:
parent
f99b37a66b
commit
ca818581b8
@ -98,14 +98,8 @@ class htmlUtils:
|
||||
|
||||
@classmethod
|
||||
def getJSON(cls,url):
|
||||
res = requests.get(url,headers=cls.headers, timeout=180)
|
||||
if res.status_code != 200:
|
||||
return None
|
||||
try:
|
||||
return json.loads(res.text)
|
||||
except:
|
||||
return None
|
||||
|
||||
return cls.getHTML(url,type="json")
|
||||
|
||||
@classmethod
|
||||
def xpathData(cls,c_xpath,url=None,num=None,not_eq=None,update=False):
|
||||
if url == None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user