Skip to content

Instantly share code, notes, and snippets.

@ohld
Created March 3, 2019 00:38
Show Gist options
  • Save ohld/8927ad08b04e2f1654549f0448e25938 to your computer and use it in GitHub Desktop.
Save ohld/8927ad08b04e2f1654549f0448e25938 to your computer and use it in GitHub Desktop.
The final request and magic
phone_id = generate_uuid()
uuid = generate_uuid()
device_id = generate_device_id(hex_digest(USERNAME, USERNAME))
data = json.dumps({
'phone_id': phone_id,
'device_id': device_id,
'guid': uuid,
'username': USERNAME,
'password': PASSWORD,
})
data = generate_signature(data)
session = requests.Session()
session.headers.update(REQUEST_HEADERS)
session.headers.update({'User-Agent': user_agent})
response = session.post(LOGIN_URL, data=data)
assert response.status_code == 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment