feat: add brotlicffi for Brotli HTTP compression support#2
Open
mikeNieto wants to merge 1 commit intovkfolio:masterfrom
Open
feat: add brotlicffi for Brotli HTTP compression support#2mikeNieto wants to merge 1 commit intovkfolio:masterfrom
mikeNieto wants to merge 1 commit intovkfolio:masterfrom
Conversation
Add brotlicffi>=1.2.0.1 as a dependency to enable Brotli content-encoding support when fetching web pages during extraction. Many modern servers negotiate Brotli (br) encoding via Accept-Encoding; without this library the HTTP client silently falls back to gzip or fails to decode responses, leading to garbled or empty content. brotlicffi provides a CFFI-based binding to the reference Brotli C library, making it compatible with any Python platform that supports CFFI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
brotlicffi>=1.2.0.1torequirements.txtto enable native Brotli (br) content-encoding support in the HTTP client.Why
Many modern web servers advertise and prefer Brotli compression via the
Accept-Encoding: brheader. Thehttpxclient (used during page extraction) will negotiate Brotli if the library is present — but without it, responses compressed with Brotli either fail to decode or fall back silently to gzip, resulting in garbled, incomplete, or empty extracted content.What changes
requirements.txtbrotlicffi>=1.2.0.1Benefits
brotlicffiuses CFFI bindings to the reference C library and ships pre-built wheels for all major platforms, so no extra system packages are required.Testing
No code changes — dependency only. Existing test suite covers the extraction pipeline and should pass without modification.