diff --git a/parser_test.go b/parser_test.go index 2d6bfeb..e22eaea 100644 --- a/parser_test.go +++ b/parser_test.go @@ -30,9 +30,9 @@ func (tt *Toutiao) GetSpiderID() int { func (tt *Toutiao) ToDoParser(adstring string) (string, error) { - log.Println(adstring) adstring = strconv.QuoteToASCII(adstring) adstring = strings.Replace(adstring, "\\", "", -1) + log.Println(adstring) var adlist interface{} if err := json.Unmarshal([]byte(adstring), &adlist); err != nil { @@ -51,6 +51,8 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) { } func TestParserToutiao(t *testing.T) { + log.SetFlags(log.Llongfile) + tt := Toutiao{} tt.ConfigLogDB("logdb.yaml") tt.ConfigQueue("queue.yaml")