Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- url = "https://minhaapi.com/v1/login/username"
- querystring = {"countryCode":"BR"}
- payload = "username=user&password=teste123&clientVersion=2.4.9-undefined"
- headers = {
- 'Content-Type': "application/x-www-form-urlencoded",
- 'x-requested-with': "XMLHttpRequest",
- 'x-tidal-token': "wdgaB1CilGA-S_s2"
- }
- response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
- print(response.text)
- Resposta da minha API(Quando o usuário está cadastrado):
- {"userId":57261722,"sessionId":"5b1ada5b-addf-4804-a55e-a12f36959ff1","countryCode":"BR"}
- for url in response.text:
- if 'userId' in url.lower():
- print ("OK")
Add Comment
Please, Sign In to add comment