salsa_account_requests.py 837 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
# using requests to automate salsa account registration

import requests

print("Welcome to GSoC 2018")
print("Project: Wizard/GUI Helping Students get Started\n")
print("This is a program to automate the process of new account creation on Salsa.\n")

#Submitting data

with requests.Session() as c:
    
    url="https://signup.salsa.debian.org/"
    
    username=input("Enter you username: ")  
    name=input("Enter you name: ")
    email = input("Enter you email: ")
    pwd1=input("Enter you password: ")
    pwd2=input("Confirm your password: ")
    
    c.get(url)
    
    login_data={'username_prefix':username, 'name':name, 'email':email, 'password':pwd1, 'confirm':pwd2, '':'Register account'}
    
    c.post(url,data=login_data,stream=True)


print("\nCongrats! Your Salsa account has been created")

d=input("\nexit")