This commit is contained in:
eson 2018-12-20 03:27:01 +08:00
parent 875c665542
commit 1f49dc7987

View File

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