213
This commit is contained in:
parent
82677544db
commit
8f42af3716
|
@ -30,12 +30,8 @@ func (tt *Toutiao) GetSpiderID() int {
|
||||||
func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
|
func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
|
||||||
|
|
||||||
log.Println(adstring)
|
log.Println(adstring)
|
||||||
unq, err := strconv.Unquote(adstring)
|
adstring = strconv.QuoteToASCII(adstring)
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
} else {
|
|
||||||
adstring = unq
|
|
||||||
}
|
|
||||||
var adlist interface{}
|
var adlist interface{}
|
||||||
if err := json.Unmarshal([]byte(adstring), &adlist); err != nil {
|
if err := json.Unmarshal([]byte(adstring), &adlist); err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user