summaryrefslogtreecommitdiffstats
path: root/openai_rev/forefront/mail.py
diff options
context:
space:
mode:
authorRaju Komati <komatiraju032@gmail.com>2023-04-27 21:10:43 +0200
committerRaju Komati <komatiraju032@gmail.com>2023-04-27 21:10:43 +0200
commit920fe19608ba06ed8c2b4c9a23944af35cf24e56 (patch)
treeaf356603b7918af1ea5cdfe0c48830a599ee5903 /openai_rev/forefront/mail.py
parentUpdate README.md (diff)
downloadgpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.gz
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.bz2
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.lz
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.xz
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.tar.zst
gpt4free-920fe19608ba06ed8c2b4c9a23944af35cf24e56.zip
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']