Added random password to subscription.
parent
48fe434b83
commit
7e0f2edced
3
main.py
3
main.py
|
@ -24,7 +24,8 @@ def pull_feed_entries():
|
|||
return all_entries[:app.config['MAX_ENTRIES']]
|
||||
|
||||
def mailman_subscribe(email, mailing_list):
|
||||
r = requests.post("https://lists.hackerspace.pl/subscribe/" + mailing_list, {"email": email, "fullname": "", "pw": "", "pw-conf": "", "email-button": "Zapisz", "digest": 0})
|
||||
password = "".join(random.choice(string.letters) for _ in range(8))
|
||||
r = requests.post("https://lists.hackerspace.pl/subscribe/" + mailing_list, {"email": email, "fullname": "", "pw": password, "pw-conf": password, "email-button": "Zapisz", "digest": 0})
|
||||
if r.status_code != 200:
|
||||
return False
|
||||
return True
|
||||
|
|
Reference in New Issue