This module is simply just an API Wrapper and account generator. So it's an API Wrapper with free copilots.
This module uses emailnator to generate new accounts. As you know, when you create a new account, you will have 5 copilots. That's how it works! This module will generate you new gmails (using @googlemail.com right now) with emailnator and you will have UNLIMITED COPILOTS!
- requests
- requests-toolbelt
- beautifulsoup4
- lxml (Parser for BeautifulSoup)
- websocket-client
- aiohttp (if you are going to use asynchronous version)
Install requirements with:
pip3 install -r requirements.txtor with single-line command:
pip3 install requests&&pip3 install beautifulsoup4&&pip3 install lxml&&pip3 install websocket-client&&pip3 install requests-toolbeltand aiohttp if you are going to use asynchronous version:
pip3 install aiohttpFirst thing first, Perplexity.ai is protected by cloudflare, and emailnator too. We need to open this pages manually and get the cookies. And do not forget these cookies are temporary, so you need to renew them continuously. Here how to get your cookies.
import perplexity
perplexity_headers = <your headers here>
perplexity_cookies = <your cookies here>
emailnator_headers = <your headers here>
emailnator_cookies = <your cookies here>
perplexity_cli = perplexity.Client(perplexity_headers, perplexity_cookies)
perplexity_cli.create_account(emailnator_headers, emailnator_cookies) # Creates a new gmail, so your 5 copilots will be renewed. You can pass this one if you are not going to use "copilot" mode
# modes = ['concise', 'copilot']
# focus = ['internet', 'scholar', 'writing', 'wolfram', 'youtube', 'reddit', 'wikipedia']
# file = (data, filetype) perplexity supports two file types, txt and pdf
print(perplexity_cli.search('Your query here', mode='copilot', focus='internet', file=(open('myfile.txt', 'rb').read(), 'txt')))
# perplexity_cli.create_account(emailnator_headers, emailnator_cookies) # Call this function when you're out of copilotsimport perplexity_async
import asyncio
perplexity_headers = <your headers here>
perplexity_cookies = <your cookies here>
emailnator_headers = <your headers here>
emailnator_cookies = <your cookies here>
async def test():
perplexity_cli = await perplexity_async.Client(perplexity_headers, perplexity_cookies)
await perplexity_cli.create_account(emailnator_headers, emailnator_cookies) # Creates a new gmail, so your 5 copilots will be renewed. You can pass this one if you are not going to use "copilot" mode
# modes = ['concise', 'copilot']
# focus = ['internet', 'scholar', 'writing', 'wolfram', 'youtube', 'reddit', 'wikipedia']
# file = (data, filetype) perplexity supports two file types, txt and pdf
print(await perplexity_cli.search('Your query here', mode='copilot', focus='internet', file=(open('myfile.txt', 'rb').read(), 'txt')))
# await perplexity_cli.create_account(emailnator_headers, emailnator_cookies) # Call this function when you're out of copilots
asyncio.run(test())Do not forget these cookies are temporary, so you need to renew them continuously.
- Open emailnator website. Click F12 or Ctrl + Shift + I to open inspector. Check "Preserve log" button, go to the "Network" tab in the inspector, click the "Go !" button in the website, right click the "message-list" in the Network Tab and hover on "Copy" and click to "Copy as cURL (bash)". Now go to the curlconverter, paste your code here. The header and cookies dictionary will appear, copy them and use in your codes.
- Open Perplexity.ai website. Sign out if you're signed in. Click F12 or Ctrl + Shift + I to open inspector. Check "Preserve log" button, go to the "Network" tab in the inspector, click the "Sign Up" button in the website, write a random email and click "Continue with Email" button, right click the "email" in the Network Tab and hover on "Copy" and click to "Copy as cURL (bash)". Now go to the curlconverter, paste your code here. The header and cookies dictionary will appear, copy them and use in your codes.
- Don't confuse the headers and cookies for emailnator and Perplexity.ai, look at How To Use to learn how to use them.


