213
This commit is contained in:
parent
9f3e28c9e4
commit
96437b419b
|
@ -8,6 +8,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/tidwall/gjson"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -43,6 +45,9 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
|
||||||
spew.Dump(adlist)
|
spew.Dump(adlist)
|
||||||
|
|
||||||
for _, data := range adlist {
|
for _, data := range adlist {
|
||||||
|
var gv interface{}
|
||||||
|
gjson.Unmarshal([]byte(data), &gv)
|
||||||
|
log.Println(gv)
|
||||||
data = strings.Trim(data, "\"")
|
data = strings.Trim(data, "\"")
|
||||||
unq, _ := strconv.Unquote("\"" + data + "\"")
|
unq, _ := strconv.Unquote("\"" + data + "\"")
|
||||||
unq, _ = strconv.Unquote(unq)
|
unq, _ = strconv.Unquote(unq)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user