Code
import requests
x = input("Gib email pls")
def CheckReg(page): #Checks if amazon account exists.
try:
with ss as requests.Session:
ss.headers.update(
{
'Host': 'www.amazon.com',
'User-Agent': 'Mozilla/5.0 (iPad; CPU OS 6_0_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A523 Safari/8536.25',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate, br',
'Content-Type': 'application/x-www-form-urlencoded',
'DNT': '1',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1'
})
r = ss.get('https://www.amazon.com')
cookies = r.cookies
r = ss.post('https://www.amazon.com/ap/register?_encoding=UTF8&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fgp%2Fyourstore%2Fhome%3Fie%3DUTF8%26ref_%3Dgno_newcust?&email={}'.format(page), cookies=cookies)
if 'You indicated you are a new customer, but an account already exists with the e-mail' in r.text:
return True
elif 'Create your Amazon account' in r.text:
return False
else:
return r.text
except:
pass
if __name__ == '__main__':
y = CheckReg(str(x))
print(y)It returns "None"
Any idea what's the problem behind this ?

