diff options
author | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-05-02 12:46:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 12:46:54 +0200 |
commit | 33fa009125c1c6c249054f92f59a325ca06cba87 (patch) | |
tree | 1f114e794695779679135bac586d255f820f0e93 /gpt4free/quora/backup-mail.py | |
parent | add italygpt.it (diff) | |
parent | Update README.md (diff) | |
download | gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.tar gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.tar.gz gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.tar.bz2 gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.tar.lz gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.tar.xz gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.tar.zst gpt4free-33fa009125c1c6c249054f92f59a325ca06cba87.zip |
Diffstat (limited to 'gpt4free/quora/backup-mail.py')
-rw-r--r-- | gpt4free/quora/backup-mail.py | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/gpt4free/quora/backup-mail.py b/gpt4free/quora/backup-mail.py index 0a2a5e94..25d526d7 100644 --- a/gpt4free/quora/backup-mail.py +++ b/gpt4free/quora/backup-mail.py @@ -1,7 +1,10 @@ -from requests import Session
-from time import sleep
from json import loads
from re import findall
+from time import sleep
+
+from requests import Session
+
+
class Mail:
def __init__(self) -> None:
self.client = Session()
@@ -9,29 +12,34 @@ class Mail: self.cookies = {'acceptcookie': 'true'}
self.cookies["ci_session"] = self.client.cookies.get_dict()["ci_session"]
self.email = None
+
def get_mail(self):
- respone=self.client.post("https://etempmail.com/getEmailAddress")
- #cookies
+ respone = self.client.post("https://etempmail.com/getEmailAddress")
+ # cookies
self.cookies["lisansimo"] = eval(respone.text)["recover_key"]
self.email = eval(respone.text)["address"]
return self.email
+
def get_message(self):
print("Waiting for message...")
while True:
sleep(5)
- respone=self.client.post("https://etempmail.com/getInbox")
- mail_token=loads(respone.text)
+ respone = self.client.post("https://etempmail.com/getInbox")
+ mail_token = loads(respone.text)
print(self.client.cookies.get_dict())
if len(mail_token) == 1:
break
-
- params = {'id': '1',}
- self.mail_context = self.client.post("https://etempmail.com/getInbox",params=params)
+
+ params = {
+ 'id': '1',
+ }
+ self.mail_context = self.client.post("https://etempmail.com/getInbox", params=params)
self.mail_context = eval(self.mail_context.text)[0]["body"]
return self.mail_context
- #,cookies=self.cookies
+
+ # ,cookies=self.cookies
def get_verification_code(self):
message = self.mail_context
code = findall(r';">(\d{6,7})</div>', message)[0]
print(f"Verification code: {code}")
- return code
\ No newline at end of file + return code
|