213
This commit is contained in:
parent
96437b419b
commit
107a98ffe4
|
@ -45,13 +45,15 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
|
||||||
spew.Dump(adlist)
|
spew.Dump(adlist)
|
||||||
|
|
||||||
for _, data := range adlist {
|
for _, data := range adlist {
|
||||||
|
|
||||||
|
data = strings.Trim(data, "\"")
|
||||||
|
unq, _ := strconv.Unquote("\"" + data + "\"")
|
||||||
|
data = unq
|
||||||
|
|
||||||
var gv interface{}
|
var gv interface{}
|
||||||
gjson.Unmarshal([]byte(data), &gv)
|
gjson.Unmarshal([]byte(data), &gv)
|
||||||
log.Println(gv)
|
log.Println(gv)
|
||||||
data = strings.Trim(data, "\"")
|
|
||||||
unq, _ := strconv.Unquote("\"" + data + "\"")
|
|
||||||
unq, _ = strconv.Unquote(unq)
|
|
||||||
data = unq
|
|
||||||
var v interface{}
|
var v interface{}
|
||||||
json.Unmarshal([]byte(data), &v)
|
json.Unmarshal([]byte(data), &v)
|
||||||
spew.Dump(v)
|
spew.Dump(v)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user