helallao / perplexity-ai

Unofficial API Wrapper for Perplexity.ai + Account Generator
https://perplexity.ai
MIT License
285 stars 50 forks source link

Perplexity account creating error: <Response [400]> #32

Closed cyba09 closed 10 months ago

cyba09 commented 11 months ago

Good Day! Thank you for the script it does work wonderfully, Yesterday I had the script working well on copilot mode and also it was creating new accounts using emailnator, but somehow today it stopped working keeps getting the error Perplexity account creating error: <Response [400]> , 1st I thought cloudfare is blocking me but I am able to query prompts on concise mode and also can access the website via Google Chrome, I have double checked all my headers and cookies for both Emailnator and Perplexity there seem to be in order, Is there something I am missing. Your help is greatly appreciated?

helallao commented 11 months ago

I really don't know what causing this, just tested and it's working on my side. If you're using vpn or something intersecting your network, you need to shut it off. Also some outdated libraries may cause that, try to update your libraries:

pip3 install -U requests&&pip3 install -U beautifulsoup4&&pip3 install -U lxml&&pip3 install -U websocket-client&&pip3 install -U requests-toolbelt
cyba09 commented 11 months ago

Thanks for your reply, I stopped getting the issue all of a sudden, so here is the thing I am currently residing in South Africa and here I have long concluded the script don't work here, so I use a USA based VPS with a GUI sometimes it works, sometimes it doesn't, I now have a perplexity PRO account, but everytime I run it it raise the error that goes by 'You have no copilots left' even though I have about 590 left for the day, is it something wrong with my network, because if I change my prompt to concise mode it does work

cyba09 commented 11 months ago

It was an network issue

helallao commented 11 months ago

If you got PRO account and want to use it, then look at issue #4. Also change copilot and file_upload values at line 94 manually to not cause assertion errors.

Edit: I have added support for PRO accounts, you can use perplexity.Client(..., own=True)

cyba09 commented 11 months ago

Thanks bro, I changed line 94 and the script works, I appreciate all time you took to reply