Git Product home page Git Product logo

Comments (4)

ReaJason avatar ReaJason commented on June 3, 2024

不知道诶,请问这个怎么测试🫠

from xhs.

godJBJ avatar godJBJ commented on June 3, 2024

只能发笔记试试看流量正不正常了。

from xhs.

godJBJ avatar godJBJ commented on June 3, 2024

发布笔记有时候也会报错(测试有一定概率报错),如下:
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.

ReaJason avatar ReaJason commented on June 3, 2024

暂时不太懂 playwright 为什么会报这个错误,可以试试捕获异常然后重试。

from xhs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.