diff options
author | Aymane Hrouch <jo.aymane@gmail.com> | 2023-04-27 16:43:59 +0200 |
---|---|---|
committer | Aymane Hrouch <jo.aymane@gmail.com> | 2023-04-27 16:43:59 +0200 |
commit | f1594cfddecf2bd47a25d54852834b392eaa4efd (patch) | |
tree | 6fec52831117ee43fe7141a153b7e123ff09d469 /unfinished/openprompt | |
parent | Merge pull request #201 from DanielShemesh/patch-4 (diff) | |
download | gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.tar gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.tar.gz gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.tar.bz2 gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.tar.lz gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.tar.xz gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.tar.zst gpt4free-f1594cfddecf2bd47a25d54852834b392eaa4efd.zip |
Diffstat (limited to 'unfinished/openprompt')
-rw-r--r-- | unfinished/openprompt/create.py | 20 | ||||
-rw-r--r-- | unfinished/openprompt/mail.py | 6 | ||||
-rw-r--r-- | unfinished/openprompt/main.py | 5 | ||||
-rw-r--r-- | unfinished/openprompt/test.py | 5 |
4 files changed, 18 insertions, 18 deletions
diff --git a/unfinished/openprompt/create.py b/unfinished/openprompt/create.py index 6ccb66f4..c968c162 100644 --- a/unfinished/openprompt/create.py +++ b/unfinished/openprompt/create.py @@ -1,9 +1,9 @@ -from requests import post, get from json import dumps -#from mail import MailClient -from time import sleep +# from mail import MailClient from re import findall +from requests import post, get + html = get('https://developermail.com/mail/') print(html.cookies.get('mailboxId')) email = findall(r'mailto:(.*)">', html.text)[0] @@ -15,9 +15,9 @@ headers = { } json_data = { - 'email' : email, + 'email': email, 'password': 'T4xyt4Yn6WWQ4NC', - 'data' : {}, + 'data': {}, 'gotrue_meta_security': {}, } @@ -27,20 +27,20 @@ print(response.json()) # email_link = None # while not email_link: # sleep(1) - + # mails = mailbox.getmails() # print(mails) quit() -url = input("Enter the url: ") +url = input("Enter the url: ") response = get(url, allow_redirects=False) # https://openprompt.co/#access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNjgyMjk0ODcxLCJzdWIiOiI4NWNkNTNiNC1lZTUwLTRiMDQtOGJhNS0wNTUyNjk4ODliZDIiLCJlbWFpbCI6ImNsc2J5emdqcGhiQGJ1Z2Zvby5jb20iLCJwaG9uZSI6IiIsImFwcF9tZXRhZGF0YSI6eyJwcm92aWRlciI6ImVtYWlsIiwicHJvdmlkZXJzIjpbImVtYWlsIl19LCJ1c2VyX21ldGFkYXRhIjp7fSwicm9sZSI6ImF1dGhlbnRpY2F0ZWQiLCJhYWwiOiJhYWwxIiwiYW1yIjpbeyJtZXRob2QiOiJvdHAiLCJ0aW1lc3RhbXAiOjE2ODE2OTAwNzF9XSwic2Vzc2lvbl9pZCI6ImY4MTg1YTM5LTkxYzgtNGFmMy1iNzAxLTdhY2MwY2MwMGNlNSJ9.UvcTfpyIM1TdzM8ZV6UAPWfa0rgNq4AiqeD0INy6zV8&expires_in=604800&refresh_token=_Zp8uXIA2InTDKYgo8TCqA&token_type=bearer&type=signup -redirect = response.headers.get('location') -access_token = redirect.split('&')[0].split('=')[1] +redirect = response.headers.get('location') +access_token = redirect.split('&')[0].split('=')[1] refresh_token = redirect.split('&')[2].split('=')[1] supabase_auth_token = dumps([access_token, refresh_token, None, None, None], separators=(',', ':')) @@ -61,4 +61,4 @@ json_data = { response = post('https://openprompt.co/api/chat2', cookies=cookies, json=json_data, stream=True) for chunk in response.iter_content(chunk_size=1024): - print(chunk)
\ No newline at end of file + print(chunk) diff --git a/unfinished/openprompt/mail.py b/unfinished/openprompt/mail.py index 082ac9fb..1130e7df 100644 --- a/unfinished/openprompt/mail.py +++ b/unfinished/openprompt/mail.py @@ -1,6 +1,8 @@ -import requests import email +import requests + + class MailClient: def __init__(self): @@ -106,4 +108,4 @@ class MailClient: client = MailClient() client.newtoken() -print(client.getmails())
\ No newline at end of file +print(client.getmails()) diff --git a/unfinished/openprompt/main.py b/unfinished/openprompt/main.py index 2fa4508e..e68a3b63 100644 --- a/unfinished/openprompt/main.py +++ b/unfinished/openprompt/main.py @@ -30,8 +30,7 @@ json_data = { ], } -response = requests.post('https://openprompt.co/api/chat2', cookies=cookies, headers=headers, json=json_data, stream=True) +response = requests.post('https://openprompt.co/api/chat2', cookies=cookies, headers=headers, json=json_data, + stream=True) for chunk in response.iter_content(chunk_size=1024): print(chunk) - - diff --git a/unfinished/openprompt/test.py b/unfinished/openprompt/test.py index d178462e..65319cb6 100644 --- a/unfinished/openprompt/test.py +++ b/unfinished/openprompt/test.py @@ -1,7 +1,6 @@ access_token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNjgyMjk0ODcxLCJzdWIiOiI4NWNkNTNiNC1lZTUwLTRiMDQtOGJhNS0wNTUyNjk4ODliZDIiLCJlbWFpbCI6ImNsc2J5emdqcGhiQGJ1Z2Zvby5jb20iLCJwaG9uZSI6IiIsImFwcF9tZXRhZGF0YSI6eyJwcm92aWRlciI6ImVtYWlsIiwicHJvdmlkZXJzIjpbImVtYWlsIl19LCJ1c2VyX21ldGFkYXRhIjp7fSwicm9sZSI6ImF1dGhlbnRpY2F0ZWQiLCJhYWwiOiJhYWwxIiwiYW1yIjpbeyJtZXRob2QiOiJvdHAiLCJ0aW1lc3RhbXAiOjE2ODE2OTAwNzF9XSwic2Vzc2lvbl9pZCI6ImY4MTg1YTM5LTkxYzgtNGFmMy1iNzAxLTdhY2MwY2MwMGNlNSJ9.UvcTfpyIM1TdzM8ZV6UAPWfa0rgNq4AiqeD0INy6zV' -supabase_auth_token= '%5B%22eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNjgyMj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