This commit is contained in:
eson 2018-12-20 01:50:05 +08:00
parent 57f2979264
commit 82677544db

View File

@ -30,7 +30,12 @@ func (tt *Toutiao) GetSpiderID() int {
func (tt *Toutiao) ToDoParser(adstring string) (string, error) { func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
log.Println(adstring) log.Println(adstring)
adstring = strconv.Quote(adstring) unq, err := strconv.Unquote(adstring)
if err != nil {
log.Println(err)
} else {
adstring = unq
}
var adlist interface{} var adlist interface{}
if err := json.Unmarshal([]byte(adstring), &adlist); err != nil { if err := json.Unmarshal([]byte(adstring), &adlist); err != nil {
log.Println(err) log.Println(err)