From b5302bd773878dfff9557894006ea3eb7a41c6ff Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Fri, 30 Jul 2021 21:12:28 +0200 Subject: [PATCH] added a fake emails generator to bypass some api rate limits --- jarvis/utils/fake_emails_generator.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 jarvis/utils/fake_emails_generator.py diff --git a/jarvis/utils/fake_emails_generator.py b/jarvis/utils/fake_emails_generator.py new file mode 100644 index 0000000..dbe47dd --- /dev/null +++ b/jarvis/utils/fake_emails_generator.py @@ -0,0 +1,15 @@ +import random +import string + + +def get_random_domain(): + domains = ["hotmail.com", "gmail.com", "aol.com", "mail.com", "mail.kz", "yahoo.com"] + return random.choice(domains) + + +def get_random_name(length): + return ''.join(random.choice(string.ascii_lowercase[:12]) for i in range(length)) + + +def generate_random_email(): + return get_random_name(12) + '@' + get_random_domain()