This commit is contained in:
eson 2018-12-20 02:46:28 +08:00
parent 0364fc077b
commit e01d7c044d

View File

@ -3,6 +3,9 @@ package parser
import (
"encoding/json"
"log"
"regexp"
"strconv"
"strings"
"testing"
"github.com/davecgh/go-spew/spew"
@ -40,15 +43,11 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
spew.Dump(adlist)
for _, data := range adlist {
// data = strconv.QuoteToASCII(data)
// data = strings.Replace(data, "\\", "", -1)
data = strconv.Quote(data)
data = strings.Replace(data, "\\", "", -1)
log.Println(data)
var jdata interface{}
if err := json.Unmarshal([]byte(data), &jdata); err != nil {
log.Println(err)
}
log.Println(jdata)
regexp.Compile(``)
}
adparser := NewADParser(tt.GetSpiderID())