简体   繁体   中英

How make Python test script auto register for my site

I've site and want to add users to it using.python script So I'm trying to make python script that able to auto register
I want to use request it's fast, and beautiful soup But i don't know how to do it or how to start I'm beginner at python so if someone could help or have such script to modify it

Here is simple script to generate email and password.

import random
import string


length = 10

#define data
lower = string.ascii_lowercase
upper = string.ascii_uppercase
num = string.digits
symbols = string.punctuation

#combine the data
all = lower + upper + num + symbols

#use random
temp = random.sample(all,length)

#create the password
password = "".join(temp)


random_char = ''.join(random.choice(string.ascii_letters) for x in range(length))

print(random_char+"@gmail.com")
#print the password
print(password)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM