This commit is contained in:
eson 2018-12-20 03:28:58 +08:00
parent 1f49dc7987
commit 6ef44cb294

View File

@ -4,6 +4,7 @@ import (
"encoding/json" "encoding/json"
"log" "log"
"regexp" "regexp"
"strconv"
"strings" "strings"
"testing" "testing"
@ -43,6 +44,8 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
for _, data := range adlist { for _, data := range adlist {
data = strings.Trim(data, "\"") data = strings.Trim(data, "\"")
unq, _ := strconv.Unquote("\"" + data + "\"")
data = unq
var v interface{} var v interface{}
json.Unmarshal([]byte(data), &v) json.Unmarshal([]byte(data), &v)
spew.Dump(v) spew.Dump(v)