This commit is contained in:
eson 2018-12-20 01:34:51 +08:00
parent e66254e37c
commit 7657f50495

View File

@ -29,12 +29,12 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
log.Println(adstring) log.Println(adstring)
adstring = strconv.QuoteToASCII(adstring) adstring = strconv.QuoteToASCII(adstring)
var addata map[string]interface{} var adlist []interface{}
if err := json.Unmarshal([]byte(adstring), &addata); err != nil { if err := json.Unmarshal([]byte(adstring), &adlist); err != nil {
log.Println(err) log.Println(err)
} }
log.Println(addata) log.Println(adlist)
adparser := NewADParser(tt.GetSpiderID()) adparser := NewADParser(tt.GetSpiderID())
data, err := adparser.ToJSON() data, err := adparser.ToJSON()