MCPcopy
hub / github.com/hu17889/go_spider / TestCharSetChange

Function TestCharSetChange

core/downloader/downloader_test.go:81–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestCharSetChange(t *testing.T) {
82 var req *request.Request
83 //req = request.NewRequest("http://stock.finance.sina.com.cn/usstock/api/jsonp.php/t/US_CategoryService.getList?page=1&num=60", "jsonp")
84 req = request.NewRequest("http://soft.chinabyte.com/416/13164916.shtml", "html", "", "GET", "", nil, nil, nil)
85
86 var dl downloader.Downloader
87 dl = downloader.NewHttpDownloader()
88
89 var p *page.Page
90 p = dl.Download(req)
91
92 //hp := p.GetHtmlParser()
93 //fmt.Printf("%v", jsonMap)
94
95 //fmt.Println(doc)
96 p.GetBodyStr()
97 body := p.GetBodyStr()
98 fmt.Println(body)
99
100}

Callers

nothing calls this directly

Calls 3

DownloadMethod · 0.95
GetBodyStrMethod · 0.95
PrintlnMethod · 0.80

Tested by

no test coverage detected