|
|
@ -1275,14 +1275,14 @@ function getErData(jkdata) { |
|
|
|
// 获取网页源码
|
|
|
|
// 获取网页源码
|
|
|
|
function getHtml(url, headers) { |
|
|
|
function getHtml(url, headers) { |
|
|
|
headers = headers || {}; |
|
|
|
headers = headers || {}; |
|
|
|
let html = request(url, {headers: headers, timeout: 1, withStatusCode:true}); |
|
|
|
let html = request(url, {headers: headers, timeout: timeout, withStatusCode:true}); |
|
|
|
log(html); |
|
|
|
try{ |
|
|
|
let json = JSON.parse(html); |
|
|
|
let json = JSON.parse(html); |
|
|
|
if(json.statusCode==200){ |
|
|
|
if(json.statusCode==200){ |
|
|
|
return json.body; |
|
|
|
return json.body; |
|
|
|
}else{ |
|
|
|
} |
|
|
|
return ''; |
|
|
|
}catch(e){} |
|
|
|
} |
|
|
|
return ''; |
|
|
|
} |
|
|
|
} |
|
|
|
// extData缓存
|
|
|
|
// extData缓存
|
|
|
|
function extDataCache(jkdata) { |
|
|
|
function extDataCache(jkdata) { |
|
|
|