- Sep 11, 2019
- 2,089
- 1,959
Anyone worked with SMS-activate.ru's API?
If so, please help me out why I get this error constantly;
If so, please help me out why I get this error constantly;
Python:
getNumber = requests.get('https://sms-activate.ru/stubs/handler_api.php?api_key=$XXX&action=getNumber&service=$XX', headers=headers)
if getNumber.status_code == 200:
# A bunch of shit up here #
requests.post('https://sms-activate.ru/stubs/handler_api.php?api_key=$XXX&action=setStatus&status=$1&id=${}'.format(id), headers=headers)
while True:
pvCodeRequest = requests.get('https://sms-activate.ru/stubs/handler_api.php?api_key=$XXX&action=getStatus&id=${}'.format(id), headers=headers)
pvCode = pvCodeRequest.content
pvArr = pvCode.decode().split(':')
print(pvArr)
# THIS IS THE ERROR, IT KEEPS GIVING BAD_STATUS #
if "STATUS_OK" in pvArr:
print("PV: " + pvArr)
driver.find_element_by_name('verfication_code').send_keys("3")
break
else:
time.sleep(5)
continue