We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've run into a few sites that are compressing using Brotli over gzip.
https://chromestatus.com/feature/5420797577396224
Native support for Brotli would be a nice enhancement.
Also, if there's a workaround to handle Brotli sites, please let me know.
The text was updated successfully, but these errors were encountered:
For me, this workaround helped:
import "github.com/andybalholm/brotli"
c.OnResponse(func(r *colly.Response) { ....
if contentEncodingHeader == "br" { bodyReader := bytes.NewReader(r.Body) brReader := brotli.NewReader(bodyReader) decompressed, err := io.ReadAll(brReader) if err != nil { log.Println("Error during Brotli decompression:", err) } decompressedBody = string(decompressed) }
}
Sorry, something went wrong.
I've add br support on https://github.com/truthtracer/colly, you can try it
No branches or pull requests
I've run into a few sites that are compressing using Brotli over gzip.
https://chromestatus.com/feature/5420797577396224
Native support for Brotli would be a nice enhancement.
Also, if there's a workaround to handle Brotli sites, please let me know.
The text was updated successfully, but these errors were encountered: