213
This commit is contained in:
parent
aec7f4cf86
commit
961b0a758e
|
@ -3,7 +3,6 @@ package parser
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
"strconv"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
|
@ -30,7 +29,6 @@ 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)
|
||||||
adstring = strconv.QuoteToASCII(adstring)
|
|
||||||
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