Exemple #1
0
func VgtimeSignIn(loginUrl string) {
	postParam := map[string]interface{}{
		"x": "xx",
	}
	response, _ := ppDownloader.NewClient(nil).Get(loginUrl)
	cookies, _ := response.GetResponseCookie()
	header := &ppDownloader.RequestHeader{
		UserAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7",
		Cookie:    cookies,
		Refer:     "http://www.vgtime.com",
	}
	resp, _ := ppDownloader.NewClient(header).Post("http://www.vgtime.com/writesign.jhtml", postParam)
	body, _ := resp.GetResponseBody()
	ppLog.Info("vgtime", map[string]interface{}{"结果": string(body)})
}
Exemple #2
0
func GetContent(url string) (r []byte, err error) {
	ret, _ := ppDownloader.NewClient(nil).Get(url)
	r, err = ret.GetResponseBody()
	return
}