Comments (4)
不知道诶,请问这个怎么测试🫠
from xhs.
只能发笔记试试看流量正不正常了。
from xhs.
发布笔记有时候也会报错(测试有一定概率报错),如下:
Traceback (most recent call last):
File "D:\project\xhs-master\example\basic_usage.py", line 54, in
note_info = xhs_client.create_image_note(title, desc, images, is_private=False, post_time="2023-08-03 16:06:00")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\project\xhs-master\xhs\core.py", line 783, in create_image_note
return self.create_note(title, desc, NoteType.NORMAL.value, ats=ats, topics=topics,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\project\xhs-master\xhs\core.py", line 743, in create_note
return self.post(uri, data, headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\project\xhs-master\xhs\core.py", line 187, in post
self._pre_headers(uri, data, is_creator=is_creator)
File "D:\project\xhs-master\xhs\core.py", line 155, in _pre_headers
self.sign(
File "D:\project\xhs-master\example\basic_usage.py", line 29, in sign
encrypt_params = context_page.evaluate("([url, data]) => window._webmsxyw(url, data)", [uri, data])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\project\xhs-master\venv\Lib\site-packages\playwright\sync_api_generated.py", line 8698, in evaluate
self._sync(
File "D:\project\xhs-master\venv\Lib\site-packages\playwright_impl_sync_base.py", line 109, in _sync
return task.result()
^^^^^^^^^^^^^
File "D:\project\xhs-master\venv\Lib\site-packages\playwright_impl_page.py", line 395, in evaluate
return await self._main_frame.evaluate(expression, arg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\project\xhs-master\venv\Lib\site-packages\playwright_impl_frame.py", line 277, in evaluate
await self._channel.send(
File "D:\project\xhs-master\venv\Lib\site-packages\playwright_impl_connection.py", line 61, in send
return await self._connection.wrap_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\project\xhs-master\venv\Lib\site-packages\playwright_impl_connection.py", line 482, in wrap_api_call
return await cb()
^^^^^^^^^^
File "D:\project\xhs-master\venv\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send
result = next(iter(done)).result()
^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._api_types.Error: Execution context was destroyed, most likely because of a navigation
Process finished with exit code 1
作者大大碰到过这种情况吗?对python不是很熟看不太懂...
from xhs.
暂时不太懂 playwright 为什么会报这个错误,可以试试捕获异常然后重试。
from xhs.
Related Issues (20)
- docker中崩溃 HOT 9
- 出现requests.exceptions.ConnectionError HOT 2
- 笔记发布接口提示TypeError
- 请求发布图片笔记接口报406 HOT 1
- ubuntu22.04版本的openssl3.0出现这个问题
- get_note_by_id 返回461错误 HOT 1
- 获取话题的发布问题 HOT 2
- [get_note_by_id] 现在总是 return {} HOT 14
- report_note_metrics方法时好时坏 HOT 1
- 获取笔记评论 提示 超时 HOT 3
- 有获取创作者cookie的api吗 HOT 3
- 可以支持回复私信的功能吗? HOT 6
- 为什么这里可以不传 a1 参数 HOT 1
- xhs 发布图文提示“技术升级中”,请教这是什么原因导致的呢?
- 刚注册的新号,调用二维码接口获取到二维码之后,手机上扫码成功,但是获取二维码扫描状态的接口 返回 461 或者 471 ,怎么解决。。。
- 发布笔记时加上位置信息 HOT 1
- 发送短信出现错误 HOT 4
- 在mac,m1上,不行🙅 HOT 2
- 视频发布有文件大小限制吗? HOT 2
- 获取笔记信息的时候报错 HOT 8
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 xhs.