This commit is contained in:
eson 2018-12-20 03:38:21 +08:00
parent 96437b419b
commit 107a98ffe4

View File

@ -45,13 +45,15 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
spew.Dump(adlist)
for _, data := range adlist {
data = strings.Trim(data, "\"")
unq, _ := strconv.Unquote("\"" + data + "\"")
data = unq
var gv interface{}
gjson.Unmarshal([]byte(data), &gv)
log.Println(gv)
data = strings.Trim(data, "\"")
unq, _ := strconv.Unquote("\"" + data + "\"")
unq, _ = strconv.Unquote(unq)
data = unq
var v interface{}
json.Unmarshal([]byte(data), &v)
spew.Dump(v)