213
This commit is contained in:
parent
0f40eedc28
commit
efb9fe36a1
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user