|
@@ -7,6 +7,7 @@ import (
|
|
|
"io/ioutil"
|
|
|
qu "jygit.jydev.jianyu360.cn/data_processing/common_utils"
|
|
|
"net/http"
|
|
|
+ "net/url"
|
|
|
"reflect"
|
|
|
be "spider_creator/backend"
|
|
|
"time"
|
|
@@ -133,7 +134,6 @@ func formatUser(tmp map[string]interface{}) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 获取接口结果
|
|
|
func getResult(param, result interface{}, route string) {
|
|
|
jsonData, err := json.Marshal(param)
|
|
|
if err != nil {
|
|
@@ -163,7 +163,12 @@ func getResult(param, result interface{}, route string) {
|
|
|
qu.Debug("Error reading response body:", err)
|
|
|
return
|
|
|
}
|
|
|
- if err := json.Unmarshal(body, &result); err != nil {
|
|
|
+ decodedBody, err := url.QueryUnescape(string(body))
|
|
|
+ if err != nil {
|
|
|
+ qu.Debug("Decoded Body Error:", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if err := json.Unmarshal([]byte(decodedBody), &result); err != nil {
|
|
|
qu.Debug("Error unmarshaling response:", err)
|
|
|
return
|
|
|
}
|