Not proper way to fix the encoding error.
Gzip is not a standard option in Accept-Encoding, but removing 'br' can still fix the issue. However, to avoid using non-modern browsers without gzip support, it may be better to force users to install Brotli. This error occurred on my newly installed Python on Windows; there were no issues on my Linux machine.
This commit is contained in:
@@ -197,7 +197,7 @@ def get_session(ver_i, proxies, cookie_file):
|
||||
'User-Agent': UA,
|
||||
'Accept': 'application/json, text/javascript, */*, q=0.01',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
'Accept-Encoding': 'gzip, deflate, utf-8',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Referer': 'https://www.pinterest.com/',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'X-APP-VERSION': VER[ver_i],
|
||||
|
||||
Reference in New Issue
Block a user