Closed neekohuncho closed 1 year ago
Looks like Poe started to enforce hashes on the gql_POST
requests.
Wow, Poe recently seem to break a lot. Let's hope, we can get into a more usable state soon.
Looks like Poe started to enforce hashes on the
gql_POST
requests.
On second thought, I don't think this is the case. Perhaps they changed the algorithm for poe-tag-id
again.
I tried to check, and indeed the package broke. Something must have changed on poe.com
the formKey is error , because it check the quickJs.
this line is check the quickjs,when find it return error form key
if (!window || !window['docu' + 'ment'] || !window[_0x4eeb76(0x1a9) + 'gato' + 'r'] || typeof process !== 'unde' + _0x4eeb76(0x199) + 'd' || typeof QuickJS !== 'unde' + _0x4eeb76(0x199) + 'd' || !window[_0x4eeb76(0x174) + 'nI8q' + 'sQ']) return _0x477aff;
add this init code,while return ture form key:
var window = { 'document':{ "aaaa":"" }, 'navigator':"aaaaaaa", 'xjCOnI8qsQ':true }; var process = undefined var QuickJS = undefined
Wow the QuickJS
check makes me suspect that someone at Poe is watching this repo.
I was looking at this a few hours ago, and I believe that they also changed the algorithm for generating poe-tag-id
, although I haven't yet figured out exactly how it works.
I don't think poe-tag-id
algorithm changed, because after bypassing the document
, navigator
, ... checks, my project works fine now.
add this init code,while return ture form key:
var window = { 'document':{ "aaaa":"" }, 'navigator':"aaaaaaa", 'xjCOnI8qsQ':true }; var process = undefined var QuickJS = undefined
@xieqing520
This isn't enough to stop Poe from denying the requests. The poe-tag-id
header needs to be reverse engineered again.
add this init code,while return ture form key:
var window = { 'document':{ "aaaa":"" }, 'navigator':"aaaaaaa", 'xjCOnI8qsQ':true }; var process = undefined var QuickJS = undefined
@xieqing520This isn't enough to stop Poe from denying the requests. The
poe-tag-id
header needs to be reverse engineered again.
i only changed the form key in my async poe client, and i just passed all the pytests.
This has been fixed in version 0.4.15.
i sure Poe is watching this repo. i sleep 2hour, get new error
add this init code,while return ture form key:
var window = { 'document':{ "aaaa":"" }, 'navigator':"aaaaaaa", 'xjCOnI8qsQ':true }; var process = undefined var QuickJS = undefined
@xieqing520This isn't enough to stop Poe from denying the requests. The
poe-tag-id
header needs to be reverse engineered again.i only changed the form key in my async poe client, and i just passed all the pytests.
Yes, if you write your own form key directly in poe.py, can use it
must add "extensions": { "hash": "5fd489242adf25bf399a95c6b16de9665e521b76618a97621167ae5e11e4bce4" }
python3 examples/temporary_message.py "XXXXXXXXXXXXXXXX"
INFO:root:Setting up session... INFO:root:Downloading next_data... INFO:root:Downloading channel data... INFO:root:Downloading all bots... INFO:root:Subscribing to mutations WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (1/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (2/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (3/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (4/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (5/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (6/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (7/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (8/10)... WARNING:root:Server returned a status code of 400 while downloading https://poe.com/api/gql_POST. Retrying (9/10)... 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 "/Users/neeko/Downloads/poe-api-main-5/examples/temporary_message.py", line 9, in
client = poe.Client(token)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poe.py", line 153, in init
self.connect_ws()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poe.py", line 403, in connect_ws
self.setup_connection()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poe.py", line 195, in setup_connection
self.subscribe()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poe.py", line 361, in subscribe
result = self.send_query("SubscriptionsMutation", {
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poe.py", line 348, in send_query
r = request_with_retries(self.session.post, self.gql_url, data=payload, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/poe.py", line 83, in request_with_retries
raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com/api/gql_POST too many times.