You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"log""net/http""github.com/gocolly/colly/v2"
)
funcmain() {
// we have to disable Accept-Encoding: gzip,// because the remote server might send compressed// 404 page, avoiding the bugtr:=&http.Transport{
DisableCompression: true,
}
c:=colly.NewCollector()
c.WithTransport(tr)
c.OnError(func(resp*colly.Response, errerror) {
log.Printf("err=%v", err)
})
c.Visit("https://example.org/sitemap.xml.gz")
}
Results in:
2023/01/05 22:30:27 err=gzip: invalid header
The text was updated successfully, but these errors were encountered:
Results in:
The text was updated successfully, but these errors were encountered: