Skip to content

Commit 939e087

Browse files
committed
remove AcceptEncoding
Signed-off-by: ふぁ <[email protected]>
1 parent b83607a commit 939e087

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • twitter_openapi_python/twitter_openapi_python

twitter_openapi_python/twitter_openapi_python/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class TwitterOpenapiPython:
6666

6767
api_key = {
6868
"Accept": "*/*",
69-
"AcceptEncoding": "gzip, deflate, br",
69+
# "AcceptEncoding": "gzip, deflate, br",
70+
# "AcceptEncoding": "deflate, br",
7071
"AcceptLanguage": "en-US,en;q=0.9",
7172
"CacheControl": "no-cache",
7273
"Pragma": "no-cache",
@@ -150,7 +151,8 @@ def get_guest_client(self) -> TwitterOpenapiPythonClient:
150151
"GET",
151152
"https://twitter.com",
152153
redirect=False,
153-
headers=self.browser_headers.copy() | {"Cookie": self.cookie_to_str(session)},
154+
headers=self.browser_headers.copy()
155+
| {"Cookie": self.cookie_to_str(session)},
154156
)
155157

156158
find = re.findall(r'document.cookie="(.*?)";', res_2.data.decode())

0 commit comments

Comments
 (0)