fix
This commit is contained in:
1 parent
f99b37a66b
commit
ca818581b8
1 file changed
+2
-8
+2
-8
@@ -98,14 +98,8 @@ class htmlUtils:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getJSON(cls,url):
|
def getJSON(cls,url):
|
||||||
res = requests.get(url,headers=cls.headers, timeout=180)
|
return cls.getHTML(url,type="json")
|
||||||
if res.status_code != 200:
|
|
||||||
return None
|
|
||||||
try:
|
|
||||||
return json.loads(res.text)
|
|
||||||
except:
|
|
||||||
return None
|
|
||||||
|
|
||||||
@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):
|
||||||
if url == None:
|
if url == None:
|
||||||
|
|||||||
Reference in new issue
Block a user