Open moleoxa opened 1 month ago
重头装了环境,这回成功加载了页面并获得了cookie,但是加载书籍内容阅读页面时失败超时了。
D:\User\Desktop\test\weread-exporter>python -m weread_exporter -b adc32180813ab8786g014ba6 -o epub --force-login
Fontconfig error: Cannot load default config file: No such file: (null)
[2024-09-28 22:18:16,841][INFO]Exporting book adc32180813ab8786g014ba6
[2024-09-28 22:18:17,867][INFO][WeReadWebPage] Launch url https://weread.qq.com/web/bookDetail/adc32180813ab8786g014ba6
[2024-09-28 22:18:18,410][INFO]Browser listening on: ws://127.0.0.1:49783/devtools/browser/d14edf43-2640-41bb-b03b-1db5e5fbb560
[2024-09-28 22:18:27,130][INFO][WeReadWebPage] Waiting for login
[2024-09-28 22:18:37,137][INFO][WeReadWebPage] Waiting for login
[2024-09-28 22:18:47,145][INFO][WeReadWebPage] Login success
[2024-09-28 22:18:48,147][ERROR]Future exception was never retrieved
future: <Future finished exception=NetworkError('Protocol error Target.detachFromTarget: Target closed.')>
pyppeteer.errors.NetworkError: Protocol error Target.detachFromTarget: Target closed.
[2024-09-28 22:18:48,147][ERROR]Future exception was never retrieved
future: <Future finished exception=NetworkError('Protocol error (Target.sendMessageToTarget): No session with given id')>
pyppeteer.errors.NetworkError: Protocol error (Target.sendMessageToTarget): No session with given id
[2024-09-28 22:18:51,989][INFO][WeReadExporter] Check chapter 2/版权信息
[2024-09-28 22:18:51,989][INFO][WeReadExporter] File cache\adc32180813ab8786g014ba6\chapters\1-2.md not exist
[2024-09-28 22:18:51,989][INFO][WeReadWebPage] Go to chapter 2
[2024-09-28 22:18:52,008][INFO][WeReadWebPage] Fetch url https://weread.qq.com/web/reader/adc32180813ab8786g014ba6kc81322c012c81e728d9d180
[2024-09-28 22:18:53,270][INFO][WeReadWebPage] Fetch url https://midas.gtimg.cn/midas/minipay_v2/jsapi/cashier.js
[2024-09-28 22:18:53,271][INFO][WeReadWebPage] Fetch url https://cdn.weread.qq.com/web/wpa.js
[2024-09-28 22:18:53,271][INFO][WeReadWebPage] Fetch url https://cdn.weread.qq.com/web/wrwebnjlogic/css/app.56baec15.css
[2024-09-28 22:18:53,272][INFO][WeReadWebPage] Fetch url https://cdn.weread.qq.com/web/wrwebnjlogic/js/app.e86c9e20.js
[2024-09-28 22:19:53,848][INFO][WeReadWebPage] Current html saved to webpage.html
[2024-09-28 22:19:53,899][INFO][WeReadWebPage] Current screenshot saved to screenshot.jpg
[2024-09-28 22:19:53,899][INFO][WeReadWebPage] load selector timeout
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "D:\User\Desktop\test\weread-exporter\weread_exporter\__main__.py", line 158, in <module>
main()
File "D:\User\Desktop\test\weread-exporter\weread_exporter\__main__.py", line 154, in main
loop.run_until_complete(async_main())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\User\Desktop\test\weread-exporter\weread_exporter\__main__.py", line 92, in async_main
await exporter.export_markdown(args.load_timeout, args.load_interval)
File "D:\User\Desktop\test\weread-exporter\weread_exporter\export.py", line 353, in export_markdown
markdown = await self._page.get_markdown()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\User\Desktop\test\weread-exporter\weread_exporter\webpage.py", line 405, in get_markdown
raise RuntimeError("Wait for creating markdown timeout")
RuntimeError: Wait for creating markdown timeout
[2024-09-28 22:20:03,994][INFO]terminate chrome process...
一样的问题,你有解决方案了吗
对,我之前可以,现在不行了,也是像你这样
安装完依赖后,运行提示没有 chrome,于是把 chrome 加入环境变量。
再次以 -- force-login 参数运行,成功拉起了 chrome,但是卡住在 about:blank 页,等待一段时间后会自动退出 chrome 并报错。