Skip to content

Commit

Permalink
Add regenerating connection data after every login
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrMachowski committed Jan 18, 2021
1 parent 7b41b28 commit 29cd242
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def login_step_3(self):
return response.status_code == 200

def login(self):
self._session.close()
self._session = requests.session()
self._agent = self.generate_agent()
self._device_id = self.generate_device_id()
self._session.cookies.set("sdkVersion", "accountsdk-18.8.15", domain="mi.com")
self._session.cookies.set("sdkVersion", "accountsdk-18.8.15", domain="xiaomi.com")
self._session.cookies.set("deviceId", self._device_id, domain="mi.com")
Expand Down

0 comments on commit 29cd242

Please sign in to comment.