使用场景:
-
自动定时推流直播
使用技术:
-
python -
playwright
每个解决一个小问题
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\pythonTryEverything\putdonwphone\not_watch_live\douyu\atuo_start_douyu.py", line 453, in <module>
interface_auo_start_douyu_zhibo(MP4_DIR,2)
File "D:\pythonTryEverything\putdonwphone\not_watch_live\douyu\atuo_start_douyu.py", line 300, in interface_auo_start_douyu_zhibo
autoupload.auto_stop_zhibo()
File "D:\pythonTryEverything\putdonwphone\not_watch_live\douyu\atuo_start_douyu.py", line 81, in auto_stop_zhibo
self.helper_stop_zhibo(login_page)
File "D:\pythonTryEverything\putdonwphone\not_watch_live\douyu\atuo_start_douyu.py", line 218, in helper_stop_zhibo
page.get_by_text("关闭直播").click()
File "E:\miniconda3\lib\site-packages\playwright\sync_api\_generated.py", line 14764, in click
self._sync(
File "E:\miniconda3\lib\site-packages\playwright\_impl\_sync_base.py", line 113, in _sync
return task.result()
File "E:\miniconda3\lib\site-packages\playwright\_impl\_locator.py", line 153, in click
return await self._frame.click(self._selector, strict=True, **params)
File "E:\miniconda3\lib\site-packages\playwright\_impl\_frame.py", line 488, in click
await self._channel.send("click", locals_to_params(locals()))
File "E:\miniconda3\lib\site-packages\playwright\_impl\_connection.py", line 59, in send
return await self._connection.wrap_api_call(
File "E:\miniconda3\lib\site-packages\playwright\_impl\_connection.py", line 509, in wrap_api_call
return await cb()
File "E:\miniconda3\lib\site-packages\playwright\_impl\_connection.py", line 97, in inner_send
result = next(iter(done)).result()
playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded.
CMyDouyin is being destroyed
解决办法:
不知道具体原因,不想调试,增加异常处理
-
写作耗时:15:04 -- 15:30
如果不明白 + v watchpoints
本文由 mdnice 多平台发布