This commit is contained in:
huangsimin 2018-12-20 10:42:47 +08:00
parent faac5ca167
commit 2c38a4b53e

View File

@ -29,14 +29,16 @@ func (tt *Toutiao) GetSpiderID() int {
return 1000073 return 1000073
} }
func (tt *Toutiao) ToDoParser(adstring string) (string, error) { func (tt *Toutiao) ToDoParser(adstring string) (presult string, err error) {
// adstring = strconv.QuoteToASCII(adstring) defer func() {
// adstring = strings.Replace(adstring, "\\", "", -1) if err = recover().(error); err != nil {
// log.Println(adstring) log.Println(err)
}
}()
var adlist []string var adlist []string
if err := json.Unmarshal([]byte(adstring), &adlist); err != nil { if err = json.Unmarshal([]byte(adstring), &adlist); err != nil {
log.Println(err) log.Println(err)
} }