summaryrefslogtreecommitdiffstats
path: root/openai_rev/forefront/mail.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--openai_rev/forefront/mail.py (renamed from forefront/mail.py)14
1 files changed, 5 insertions, 9 deletions
diff --git a/forefront/mail.py b/openai_rev/forefront/mail.py
index 41c2a647..2c00051c 100644
--- a/forefront/mail.py
+++ b/openai_rev/forefront/mail.py
@@ -23,21 +23,17 @@ class Mail:
"sec-fetch-dest": "empty",
"referer": "https://mail.tm/",
"accept-encoding": "gzip, deflate, br",
- "accept-language": "en-GB,en-US;q=0.9,en;q=0.8"
+ "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
}
def get_mail(self) -> str:
token = ''.join(choices(ascii_letters, k=14)).lower()
- init = self.client.post("https://api.mail.tm/accounts", json={
- "address": f"{token}@bugfoo.com",
- "password": token
- })
+ init = self.client.post(
+ "https://api.mail.tm/accounts", json={"address": f"{token}@bugfoo.com", "password": token}
+ )
if init.status_code == 201:
- resp = self.client.post("https://api.mail.tm/token", json={
- **init.json(),
- "password": token
- })
+ resp = self.client.post("https://api.mail.tm/token", json={**init.json(), "password": token})
self.client.headers['authorization'] = 'Bearer ' + resp.json()['token']