Closed Dima-369 closed 1 year ago
it's possible but an easier way is that creating multiple accounts before your tokens get expired, so you will still be connected to them via websocket connections, even your tokens get expired.
Ah, I understand now. I modified perplexity.py
slightly to always exit after outputting the answer since I rarely run it and I usually only need a single answer when I invoke it from an external application.
By exiting, the websocket connection is simply not kept alive and I can't benefit from that. I also did not fill in emailnator_headers
and emailnator_cookies
. I suppose that is the issue for me here.
could you please share the modified code if you don't mind?
could you please share the modified code if you don't mind?
I just checked again and I, in fact, did not modify perplexity.py
, but I close the websocket after .search()
like this:
print(perplexity_cli.search('Your query here', mode='copilot', focus='internet'))
perplexity_cli.ws.close()
Then the script exits after answering.
thank you very much, and as I understand I will have to update the cookie list sometimes ?
thank you very much, and as I understand I will have to update the cookie list sometimes ?
Yes, study the README, it has all the info.
First of all, thanks for this. This works quite well, but I often get the error that the tokens are expired. Is there a way to also automate that? The user still has to manually bypass Cloudflare with clicks, but it would make updating the tokens a lot easier.