Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit fbe0b15

Browse files
committed
headers: update some versions, add possibly relevant headers
Signed-off-by: Sumner Evans <[email protected]>
1 parent 29476b6 commit fbe0b15

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

linkedin_messaging/linkedin.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@
3434
"Chrome/83.0.4103.116 Safari/537.36",
3535
]
3636
),
37-
# "accept": "application/vnd.linkedin.normalized+json+2.1",
3837
"accept-language": "en-AU,en-GB;q=0.9,en-US;q=0.8,en;q=0.7",
3938
"x-li-lang": "en_US",
4039
"x-restli-protocol-version": "2.0.0",
4140
"x-li-track": json.dumps(
4241
{
43-
"clientVersion": "1.2.6216",
42+
"clientVersion": "1.13.8031",
43+
"mpVersion": "1.13.8031",
4444
"osName": "web",
45-
"timezoneOffset": 10,
45+
"timezoneOffset": 0,
46+
"timezone": "Etc/UTC",
4647
"deviceFormFactor": "DESKTOP",
4748
"mpName": "voyager-web",
4849
}
@@ -517,7 +518,12 @@ async def _listen_to_event_stream(self):
517518

518519
async with self.session.get(
519520
REALTIME_CONNECT_URL,
520-
headers={"content-type": "text/event-stream", **REQUEST_HEADERS},
521+
headers={
522+
"accept": "text/event-stream",
523+
"connection": "keep-alive",
524+
"x-li-accept": "application/vnd.linkedin.normalized+json+2.1",
525+
**REQUEST_HEADERS,
526+
},
521527
# The event stream normally stays open for about 3 minutes, but this will
522528
# automatically close it more agressively so that we don't get into a weird
523529
# state where it's not receiving any data, but simultaneously isn't closed.

0 commit comments

Comments
 (0)