Comments (59)
Please stop bombing this thread unless if you actually have more information. It'll make it easier on the developers. Also, if you have the same issue, place a thumbs up on the first comment.
from poe-api.
https://github.com/snowby666/poe-api-wrapper is working for me
from poe-api.
I've fixed this in the latest commit, but the library is still broken due to changes in the __NEXT_DATA__
format.
from poe-api.
My current understanding of this bug is that Poe has started enforcing some sort of cloudflare-based verification which requires a full web browser.
from poe-api.
not the same promblem, i can successfuly download the poe.com, but i can't send query successfullt.
@canxin121Are you able to port those changes from your async client to this library?
But my library don't have this downloading problem. I don't know why, perhaps because the headers? or aiohttp?I will try to find the reason.
from poe-api.
Sorry for the lack of an update, but I'm currently busy right now and won't be able to work on this for at least a week. Although if someone submits a PR that fixes this issue then I'll merge it and publish a new release.
from poe-api.
https://github.com/x404xx/POE-Api seems ok
from poe-api.
"After investigating, I found that accessing https://poe.com/ using GET method prompts a 403 error, 'Enable JavaScript and cookies to continue.' I can successfully retrieve data by using the Selenium library to access https://poe.com/, but it requires writing the cookies: p-b, __cf_bm, and cf_clearance in advance."
is what @31702160136 is saying, but what exactly does this mean?
from poe-api.
Hi Guys,
Started getting this error on Saturday, I sent an email to Poe and they said that the specific IP has been blocked for 7 days. I have tried using my same token from another IP, I tried getting another account with a different token and all have come up with the same 403 error. I think that they must have some antiscraping software running which is flagging the API requests. Has anyone tried using sock5 proxies ? Any better ?
Did you try new account with new ip ?
And if they are banning or they have some mechanism in place and even if new ip with new account works it will be useless as it will be limited again right ?
I have tried with diffrent ip and diffrent account key still the error
from poe-api.
from poe-api.
I've fixed this in the latest commit, but the library is still broken due to changes in the
__NEXT_DATA__
format.
So does it work now or not?
from poe-api.
same here
from poe-api.
same problem
from poe-api.
一样的遭遇。
from poe-api.
yeah same here RuntimeError: Failed to download https://poe.com too many times.
from poe-api.
Its hapenning on older versions as well i was in v0.4.x
Its sad i had lots of texts to summerize
from poe-api.
Same problem(
from poe-api.
same here!
from poe-api.
SAME
from poe-api.
same
from poe-api.
Unfortunately same :(
from poe-api.
same here :(
from poe-api.
我经过排查后发现使用GET访问https://poe.com提示403,Enable JavaScript and cookies to continue。我使用selenium库去访问https://poe.com可以成功获取到数据,但需要提前写入cookie:p-b、__cf_bm、cf_clearance才可以
from poe-api.
"After investigating, I found that accessing https://poe.com/ using GET method prompts a 403 error, 'Enable JavaScript and cookies to continue.' I can successfully retrieve data by using the Selenium library to access https://poe.com/, but it requires writing the cookies: p-b, __cf_bm, and cf_clearance in advance."
is what @31702160136 is saying, but what exactly does this mean?
我对这方面不太熟悉,我认为是需要加载JavaScript后才可以获得到数据,我们通常使用代码进行GET请求页面是无法加载JavaScript的,但是使用浏览器就可以加载JavaScript
from poe-api.
"After investigating, I found that accessing https://poe.com/ using GET method prompts a 403 error, 'Enable JavaScript and cookies to continue.' I can successfully retrieve data by using the Selenium library to access https://poe.com/, but it requires writing the cookies: p-b, __cf_bm, and cf_clearance in advance."
is what @31702160136 is saying, but what exactly does this mean?我对这方面不太熟悉,我认为是需要加载JavaScript后才可以获得到数据,我们通常使用代码进行GET请求页面是无法加载JavaScript的,但是使用浏览器就可以加载JavaScript
Have you confirmed that this method works?
from poe-api.
我经过排查后发现使用GET访问https://poe.com提示403,Enable JavaScript and cookies to continue。我使用selenium库去访问https://poe.com可以成功获取到数据,但需要提前写入cookie:p-b、__cf_bm、cf_clearance才可以
昨天用golang的chromedp访问好像也没问题,只需要加入p-b就行
from poe-api.
我经过排查后发现使用GET访问https://poe.com提示403,启用JavaScript和cookie才能继续。我使用selenium去库访问https://poe.com可以成功获取到数据,但需要提前写入cookie :pb、__cf_bm、cf_clearance才可以
昨天用golang的chromedp访问没什么问题,只需要加入pb就行
我试了一下,确实只需要pb,之前我需要加入__cf_bm和cf_clearance是因为浏览器有缓存
from poe-api.
“经过调查,我发现使用 GET 方法访问https://poe.com/会提示 403 错误,'启用 JavaScript 和 cookies 即可继续'。我可以使用 Selenium 库访问https://poe.com/成功检索数据,但需要提前写入cookie:pb、__cf_bm 和 cf_clearance。”
是什么@31702160136是这么说的,但这到底是什么意思呢?我对这方面还不太熟悉,我认为是需要加载JavaScript后才能获得数据,通常使用我们的代码进行GET请求页面是无法加载JavaScript的,但是使用浏览器就可以加载JavaScript
你确认这个方法有效吗?
确实能有效获得到数据,但是又遇到了新的问题,提示’document‘ is not defined,可能是formkey算法变了
from poe-api.
me too getting the same
from poe-api.
Same Problem
from poe-api.
same
from poe-api.
same
from poe-api.
same on an older version too, looks like it's a general problem, not a version specific one.
from poe-api.
does anyone get any idea about how to solve this error?
from poe-api.
getting the same issue, i went to poe, got the token value through inspect and ran the poe.Client and passed the token. This is the error below, please help:
File ~\anaconda3\Lib\site-packages\poe_init_.py:156, in Client.init(self, token, proxy, headers, device_id, client_identifier, formkey)
153 self.formkey_salt = None
154 self.formkey = formkey
--> 156 self.connect_ws()
File ~\anaconda3\Lib\site-packages\poe_init_.py:446, in Client.connect_ws(self, timeout)
443 self.ws_connected = False
445 if self.connect_count % 5 == 0:
--> 446 self.setup_connection()
448 self.connect_count += 1
450 ws = websocket.WebSocketApp(
451 self.get_websocket_url(),
452 header={"User-Agent": user_agent},
(...)
456 on_close=self.on_ws_close
457 )
File ~\anaconda3\Lib\site-packages\poe_init_.py:182, in Client.setup_connection(self)
179 self.setup_count += 1
181 self.ws_domain = f"tch{random.randint(1, 1e6)}"
--> 182 self.next_data = self.get_next_data(overwrite_vars=True)
183 self.channel = self.get_channel_data()
185 self.gql_headers = {
186 "poe-formkey": self.formkey,
187 "poe-tchannel": self.channel["channel"],
188 }
File ~\anaconda3\Lib\site-packages\poe_init_.py:244, in Client.get_next_data(self, overwrite_vars)
241 def get_next_data(self, overwrite_vars=False):
242 logger.info("Downloading next_data...")
--> 244 r = request_with_retries(self.session.get, self.home_url)
245 json_regex = r'<script id="__NEXT_DATA__" type="application\/json">(.+?)</script>'
246 json_text = re.search(json_regex, r.text).group(1)
File ~\anaconda3\Lib\site-packages\poe_init_.py:84, in request_with_retries(method, *args, **kwargs)
81 raise RuntimeError("Invalid or missing token.")
82 logger.warn(f"Server returned a status code of {r.status_code} while downloading {url}. Retrying ({i+1}/{attempts})...")
---> 84 raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com/ too many times.
from poe-api.
Hi Guys,
Started getting this error on Saturday, I sent an email to Poe and they said that the specific IP has been blocked for 7 days. I have tried using my same token from another IP, I tried getting another account with a different token and all have come up with the same 403 error. I think that they must have some antiscraping software running which is flagging the API requests. Has anyone tried using sock5 proxies ? Any better ?
from poe-api.
作者也不出来说两句, 也不知道是能解决还是不能解决
from poe-api.
解决应该是能解决,但是一解决就会被盯上,估计也是难
from poe-api.
Hi Guys,
Started getting this error on Saturday, I sent an email to Poe and they said that the specific IP has been blocked for 7 days. I have tried using my same token from another IP, I tried getting another account with a different token and all have come up with the same 403 error. I think that they must have some antiscraping software running which is flagging the API requests. Has anyone tried using sock5 proxies ? Any better ?Did you try new account with new ip ? And if they are banning or they have some mechanism in place and even if new ip with new account works it will be useless as it will be limited again right ?
I have tried with diffrent ip and diffrent account key still the error
Yes still get the same error. Any luck with proxies or selenium?
from poe-api.
Hi Guys,
Started getting this error on Saturday, I sent an email to Poe and they said that the specific IP has been blocked for 7 days. I have tried using my same token from another IP, I tried getting another account with a different token and all have come up with the same 403 error. I think that they must have some antiscraping software running which is flagging the API requests. Has anyone tried using sock5 proxies ? Any better ?Did you try new account with new ip ? And if they are banning or they have some mechanism in place and even if new ip with new account works it will be useless as it will be limited again right ?
I have tried with diffrent ip and diffrent account key still the errorYes still get the same error. Any luck with proxies or selenium?
have you tried to set a Custom Device ID with new IP and account ?
from the README:
Setting a Custom Device ID:
If you want to change the device ID that is being spoofed, you can use the poe.set_device_id, which accepts the following arguments:
user_id - The user ID of the account you want to change the device ID for. The user ID can be found at client.viewer["poeUser"]["id"]. device_id - The new device ID. This is a 32 character UUID string in the following format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
poe.set_device_id("UGMlVXqlcLYyMOATMDsKNTMz", "6d659b04-043a-41f8-97c7-fb7d7fe9ad34")
The device IDs are saved to ~/.config/poe-api/device_id.json on Unix-like systems, and C:\Users<user>\AppData\Roaming\poe-api\device_id.json on Windows.
Additionally, the poe.get_device_id function or client.device_id can be used to retrieve the saved device ID.
poe.get_device_id("UGMlVXqlcLYyMOATMDsKNTMz")
#6d659b04-043a-41f8-97c7-fb7d7fe9ad34client.device_id
#6d659b04-043a-41f8-97c7-fb7d7fe9ad34"
from poe-api.
How to resolve this, guys
from poe-api.
感觉解决不了 放弃了一个月了 作者好像没有要解决的意思 换个库吧兄弟
from poe-api.
from poe-api.
目前自己golang用的无头浏览器,劫持ws消息,勉强能用吧,不用一堆js,希望作者早日修复bug
有什么好的库推荐下呗
…
---Original--- From: "Wang @.> Date: Wed, Aug 9, 2023 15:20 PM To: @.>; Cc: @.@.>; Subject: Re: [ading2210/poe-api] Server returned a status code of 403 whiledownloading https://poe. com (Issue #218) 感觉解决不了 放弃了一个月了 作者好像没有要解决的意思 换个库吧兄弟 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
from poe-api.
from poe-api.
curl 'https://poe.com/' \
-H 'authority: poe.com' \
-H 'cookie: p-b=<token>' \
-H 'user-agent: <copy user-agent>' --http2
after testing with curl
- found that both "authority" and "user-agent" header required
- http1.1 doesnt work (tested with
--http1.1
on curl and it gave the error), http2 does
but...
- requests is a 1.1 only library, maybe httpx might work?
can anybody confirm this?
from poe-api.
@ading2210 You added the help wanted label. Is there anything you need right now? Or are you just busy with other stuff right now?
from poe-api.
@ading2210 You added the help wanted label. Is there anything you need right now? Or are you just busy with other stuff right now?
and...I feel something like dead project.
from poe-api.
希望作者能注意到这个问题,解决一下
from poe-api.
Alright, thanks for the update! If your understanding is correct, that would be rather sad to see.
@canxin121 I assume you experience the same problem with your async client?
from poe-api.
not the same promblem, i can successfuly download the poe.com, but i can't send query successfullt.
from poe-api.
My current understanding of this bug is that Poe has started enforcing some sort of cloudflare-based verification which requires a full web browser.
Maybe selenium would work for this project?
from poe-api.
from poe-api.
@canxin121 That's interesting findings. Apparently, a web browser might only be required to retrieve the formkey, then (if even that)? That might leave some room for a hybrid solution where the formkey can get extracted through browser automation and following that the API can still be used.
from poe-api.
@ading2210 可以参考这个项目, 他解决了目前的问题, https://github.com/canxin121/Async-Poe-Client
from poe-api.
not the same promblem, i can successfuly download the poe.com, but i can't send query successfullt.
@canxin121
Are you able to port those changes from your async client to this library?
from poe-api.
@ongspxm
I got a 200 returned with a full set of browser cookies and the user-agent. I didn't use the authority header and made the request with http1.1. I don't know if it's the same for everyone, but it seems to be entirely a Cloudflare issue for me.
from poe-api.
寄!
from poe-api.
try g4f pypi
from poe-api.
Related Issues (20)
- SendMessageMutation returned an error: Server Error | Retrying (1/20) | Response: {'data': None, 'errors': [{'message': 'Server Error'}], 'extensions': {'is_final': True, 'enable_i18n': True}} HOT 1
- chunk['text'] gets incomplete anwser HOT 3
- 使用接口调用GPT4,回复的是GPT3.5的结果,而且没有扣除GPT4的次数 HOT 3
- ReferenceError: 'document' is not defined HOT 1
- it raises runtime error again (RuntimeError(f"Failed to download {url} too many times.")) HOT 1
- Add a feature to upload documents HOT 1
- No module named 'poe' HOT 2
- Failed building wheel for quickjs HOT 9
- RuntimeError: Failed to download https://poe.com too many times. HOT 3
- hard to get chatId HOT 4
- Client cannot be created due to 'data' KeyError HOT 4
- Can not create poe client instance HOT 1
- Seems Poe is blocking to access poe token HOT 1
- Server returned a status code of 400 while downloading https://poe.com/api/gql_POST HOT 8
- Maintainers Needed HOT 12
- Server returned a status code of 403 while downloading bot list HOT 2
- 最新AI集成软件-AI超元域,支持多款AI同时回答
- AI超元域,免费开源多AI协作应用
- Can't find p-b cookie value HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poe-api.