layed out api request

This commit is contained in:
Hellow
2023-07-27 00:27:08 +02:00
parent 31bce2fcb1
commit 2db4ea72ef
8 changed files with 204 additions and 8 deletions

View File

@@ -53,6 +53,10 @@ class Connection:
self.hearthbeat_thread = None
self.hearthbeat_interval = hearthbeat_interval
@property
def user_agent(self) -> str:
return self.session.headers.get("user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36")
def start_hearthbeat(self):
if self.hearthbeat_interval <= 0: