poe-api
poe-api copied to clipboard
Server returned a status code of 400 while downloading https://poe.com/api/gql_POST
(.venv) allen@dedipath-instance-1:~/projects/poe-api$ python3 examples/temporary_message.py "xxxxxxxxxxxxxxxxxxxx%3D%3D"
INFO:root:Setting up session...
INFO:root:Downloading next_data...
INFO:httpx:HTTP Request: GET https://poe.com "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://psc2.cf2.poecdn.net/7f2217bbcdbfed56b253b36c7dba078a36090fad/_next/static/chunks/pages/_app-e27ceba2530b4b53.js "HTTP/1.1 200 OK"
INFO:root:Downloading channel data...
INFO:httpx:HTTP Request: GET https://poe.com/api/settings "HTTP/1.1 200 OK"
INFO:root:Downloading all bots...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (1/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (2/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (3/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (4/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (5/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (6/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (7/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (8/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (9/10)...
INFO:httpx:HTTP Request: POST https://poe.com/api/gql_POST "HTTP/1.1 400 Bad Request"
WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (10/10)...
Traceback (most recent call last):
File "/home/allen/projects/poe-api/examples/temporary_message.py", line 9, in <module>
client = poe.Client(token)
^^^^^^^^^^^^^^^^^
File "/home/allen/projects/poe-api/src/poe/__init__.py", line 155, in __init__
self.connect_ws()
File "/home/allen/projects/poe-api/src/poe/__init__.py", line 448, in connect_ws
self.setup_connection()
File "/home/allen/projects/poe-api/src/poe/__init__.py", line 196, in setup_connection
self.bots = self.get_bots(download_next_data=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/allen/projects/poe-api/src/poe/__init__.py", line 282, in get_bots
bot_list_data = self.send_query("BotSwitcherModalQuery", {})["data"]["viewer"]["availableBotsConnection"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/allen/projects/poe-api/src/poe/__init__.py", line 391, in send_query
r = request_with_retries(self.session.post, self.gql_url, data=payload, headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/allen/projects/poe-api/src/poe/__init__.py", line 83, in request_with_retries
raise RuntimeError(f"Failed to download {url} too many times.")
#227 was fixed, although a new issue comes up.
Maybe poe has changed the headers and payload format yesterday.
This project is not working anymore.
Same here but I had this error even before the update
I think poe is blocking requests sent to https://poe.com/api/gql_POST. May be we can make a workaround through https://www.quora.com/poe_api/gql_POST ? I found this one helpful with that implement: https://github.com/snowby666/poe-api-wrapper
@Nox998464 So did the wrapper work with you or not?
@Nox998464 So did the wrapper work with you or not?
Yeh, the wrapper runs smoothly for me. But Im still waiting for the async update of it
@Nox998464 So did the wrapper work with you or not?
Yeh, the wrapper runs smoothly for me. But Im still waiting for the async update of it
great thanks for the advice I will try
最新AI集成软件-AI超元域:https://github.com/win4r/AISuperDomain