2021-09-01 16:50:16 +00:00
import requests , os
2021-08-27 11:40:58 +00:00
from colorama import Fore , init
2021-12-01 10:15:02 +00:00
import random
import string
source = string . ascii_letters + string . digits
2021-08-27 05:35:17 +00:00
init ( )
2021-12-01 10:15:02 +00:00
username = ' ' . join ( ( random . choice ( source ) for i in range ( 12 ) ) )
email = ( f ' { username } ' ) + " @ " + " gmail.com "
password = ' ' . join ( ( random . choice ( source ) for i in range ( 16 ) ) )
2021-08-27 05:35:17 +00:00
2021-09-01 16:58:32 +00:00
resp = requests . post ( " https://spclient.wg.spotify.com/signup/public/v1/account " , data = {
" birth_day " : " 1 " ,
" birth_month " : " 01 " ,
" birth_year " : " 1970 " ,
2021-08-27 05:35:17 +00:00
" collect_personal_info " : " undefined " ,
2021-09-01 16:58:32 +00:00
" creation_flow " : " " ,
" creation_point " : " https://www.spotify.com/uk/ " ,
" displayname " : username ,
" username " : username ,
" gender " : " neutral " ,
" iagree " : " 1 " ,
" key " : " a1e486e2729f46d6bb368d6b2bcda326 " ,
" platform " : " www " ,
" referrer " : " https://www.spotify.com/uk/ " ,
" send-email " : " 0 " ,
" thirdpartyemail " : " 0 " ,
" email " : email ,
" password " : password ,
" password_repeat " : password
} , headers = {
" accept " : " */* " ,
2021-09-03 10:54:39 +00:00
" accept-language " : " en-uk,en;q=0.9 " ,
2021-09-01 16:58:32 +00:00
" content-type " : " application/x-www-form-urlencoded " ,
" sec-fetch-dest " : " empty " ,
" sec-fetch-mode " : " cors " ,
" sec-fetch-site " : " same-site " ,
" sec-gpc " : " 1 " ,
" referer " : " https://www.spotify.com/ " ,
" referrer-policy " : " strict-origin-when-cross-origin "
} )
2021-08-27 11:40:58 +00:00
2021-09-01 16:50:16 +00:00
if " login_token " in resp . text :
2021-12-01 10:15:02 +00:00
with open ( ' logins.txt ' , ' a ' ) as f :
f . write ( f ' { email } : { username } : { password } ' )
f . write ( ' \n ' )
print ( f ' { Fore . LIGHTGREEN_EX } Account Created \n ' )
2021-09-01 16:50:16 +00:00
elif " That email is already " or " Invalid Email " in resp . text :
2021-10-05 11:17:00 +00:00
print ( f ' { Fore . LIGHTRED_EX } You got an error! Please try using a different email \n Response: { resp . text } ' )
2021-12-01 10:15:02 +00:00
exit ( )
2021-09-01 16:50:16 +00:00
2021-08-27 05:24:41 +00:00
else :
2021-10-05 11:17:00 +00:00
print ( f ' { Fore . LIGHTRED_EX } You got an error! Try with a different username and/or disable your proxy/VPN. If that doesn \' t work, please open issue on GitHub \n Response: { resp . text } \n { resp . status_code } ' )
2021-12-01 10:15:02 +00:00
exit ( )
2022-03-25 07:41:12 +00:00