-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http.Get(url) returns error 503 but web page loads on browser just fine #16343
Labels
Comments
I think that website is protected by cloudflare.
|
It works :) Thank you :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
go version
)?1.6
go env
)?windows 7
My code :
package main
import (
"fmt"
"log"
"net/http"
)
var addr = "http://www.wuxiaworld.com/category/tdg-chapter-release"
func PeriodicUpdate() {
response, err := http.Get(addr)
if err != nil {
log.Fatal(err)
} else {
defer response.Body.Close()
fmt.Print(response)
}
}
func main() {
PeriodicUpdate()
}
Full body of the page
&{503 Service Temporarily Unavailable 503 HTTP/1.1 1 1 map[Date:[Wed, 13 Jul 2016 07:49:26 GMT] Content-Type:[text/html; charset=UTF-8]
Refresh:[8;URL=/cdn-cgi/l/chk_jschl?pass=1468396170.809-WlFrmyimVA] Cf-Ray:[2c1b236a86711577-FRA] Set-Cookie:[__cfduid=da9936617d2fd099e
19daa7d006ae49111468396166; expires=Thu, 13-Jul-17 07:49:26 GMT; path=/; domain=.wuxiaworld.com; HttpOnly] X-Frame-Options:[SAMEORIGIN]
Cache-Control:[no-cache] Server:[cloudflare-nginx]] 0x10b360c0 -1 [chunked] true map[] 0x10af4c40 }
In browser this page works OK. So why does it not work in GO?
The text was updated successfully, but these errors were encountered: