diff options
author | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-02 02:06:33 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-02 02:06:33 +0200 |
commit | 2dbeb5460827d7e3792b4e6f5871463a430fa525 (patch) | |
tree | 70299f7685b9fbe5220616ed536815df5216f873 | |
parent | +Curl +Async +Stream Requests (diff) | |
download | gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.tar gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.tar.gz gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.tar.bz2 gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.tar.lz gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.tar.xz gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.tar.zst gpt4free-2dbeb5460827d7e3792b4e6f5871463a430fa525.zip |
-rw-r--r-- | g4f/Provider/PerplexityAi.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/g4f/Provider/PerplexityAi.py b/g4f/Provider/PerplexityAi.py index 612e2d98..c7e58ad3 100644 --- a/g4f/Provider/PerplexityAi.py +++ b/g4f/Provider/PerplexityAi.py @@ -4,7 +4,6 @@ import json import time import base64 from curl_cffi.requests import AsyncSession -from fake_useragent import UserAgent from .base_provider import AsyncProvider, format_prompt, get_cookies @@ -25,7 +24,6 @@ class PerplexityAi(AsyncProvider): ) -> str: url = cls.url + "/socket.io/?EIO=4&transport=polling" headers = { - "User-Agent": UserAgent().random, "Referer": f"{cls.url}/" } async with AsyncSession(headers=headers, proxies={"https": proxy}, impersonate="chrome107") as session: @@ -44,8 +42,6 @@ class PerplexityAi(AsyncProvider): response = await session.get(url, params={"t": timestamp(), "sid": sid}) response.raise_for_status() - print(session.cookies) - data = '40{"jwt":"anonymous-ask-user"}' response = await session.post(url, params={"t": timestamp(), "sid": sid}, data=data) response.raise_for_status() |