mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-15 09:25:04 +00:00
Merge branch 'feature/AddBrotliSupport' into dev
This commit is contained in:
commit
9c56c0a5a1
3 changed files with 14 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
* Update Rarfile 4.1a1 (8a72967) to 4.1 (c9140d8)
|
||||
* Update soupsieve 2.4.1 (2e66beb) to 2.5.0 (dc71495)
|
||||
* Update thefuzz 0.19.0 (c2cd4f4) to 0.21.0 (0b49e4a)
|
||||
* Add support for Brotli compression
|
||||
|
||||
|
||||
### 3.30.1 (2023-10-02 22:50:00 UTC)
|
||||
|
|
|
@ -39,6 +39,17 @@ from _23 import decode_bytes, html_unescape, list_range, \
|
|||
Popen, scandir, urlparse, urlsplit, urlunparse
|
||||
from six import integer_types, iteritems, iterkeys, itervalues, moves, PY2, string_types, text_type
|
||||
|
||||
ACCEPT_ENCODING = "gzip,deflate"
|
||||
try:
|
||||
try:
|
||||
import brotlicffi as _unused_module_brotli # noqa: F401
|
||||
except ImportError:
|
||||
import brotli as _unused_module_brotli # noqa: F401
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
ACCEPT_ENCODING += ",br"
|
||||
|
||||
import zipfile
|
||||
# py7z hardwired removed, see comment below
|
||||
py7zr = None
|
||||
|
@ -863,7 +874,7 @@ def get_url(url, # type: AnyStr
|
|||
|
||||
# session main headers
|
||||
req_headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
||||
'Accept-Encoding': 'gzip,deflate'}
|
||||
'Accept-Encoding': ACCEPT_ENCODING}
|
||||
if headers:
|
||||
req_headers.update(headers)
|
||||
if hasattr(session, 'reserved') and 'headers' in session.reserved:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
--extra-index-url https://gitlab+deploy-token-1599941:UNupqjtDab_zxNzvP2gA@gitlab.com/api/v4/projects/279215/packages/pypi/simple
|
||||
Brotli
|
||||
cffi
|
||||
cryptography != 38.0.2; 'Windows' == platform_system
|
||||
cryptography != 38.0.2; 'Linux' == platform_system and ('x86_64' == platform_machine or 'aarch64' == platform_machine)
|
||||
|
|
Loading…
Reference in a new issue