drunkdream / weread-exporter

将微信读书中的书籍导出成epub、pdf、mobi等格式
1.03k stars 157 forks source link

反馈:下载不完整、报错,谢谢! #54

Open 290922115 opened 7 months ago

290922115 commented 7 months ago

比如 https://weread.qq.com/web/bookDetail/ddc3252071dbe8a8ddc8170 可能有些章节较多下 不了卡住,比如这本 [2023-11-27 13:52:18,250][INFO][WeReadExporter] File cache\ddc3252071dbe8a8ddc8170\chapters\7-8.md not exist [2023-11-27 13:52:18,251][INFO][WeReadWebPage] Go to chapter 8 [2023-11-27 13:52:18,276][INFO][WeReadWebPage] Fetch url https://weread.qq.com/web/reader/ddc3252071dbe8a8ddc8170kc9f326d018c9f0f895fb5e4 [2023-11-27 13:52:18,648][INFO][WeReadWebPage] Fetch url https://midas.gtimg.cn/midas/minipay_v2/jsapi/cashier.js [2023-11-27 13:52:18,653][INFO][WeReadWebPage] Fetch url https://cdn.weread.qq.com/web/wpa.js [2023-11-27 13:52:18,656][INFO][WeReadWebPage] Fetch url https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/css/app.02ecef75.css [2023-11-27 13:52:18,708][INFO][WeReadWebPage] Fetch url https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/css/8.a2448854.css [2023-11-27 13:52:18,728][INFO][WeReadWebPage] Fetch url https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/js/app.e2263c63.js [2023-11-27 13:52:48,269][WARNING]Load chapter failed, close browser and retry [2023-11-27 13:52:48,270][INFO]terminate chrome process... [2023-11-27 13:52:48,272][ERROR]connection unexpectedly closed [2023-11-27 13:52:48,273][ERROR]Task exception was never retrieved future: <Task finished name='Task-2448' coro=<Connection._async_send() done, defined at C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyppeteer\connection.py:69> exception=InvalidStateError('invalid state')> Traceback (most recent call last): File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\protocol.py", line 968, in transfer_data message = await self.read_message() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\protocol.py", line 1038, in read_message frame = await self.read_data_frame(max_size=self.max_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\protocol.py", line 1113, in read_data_frame frame = await self.read_frame(max_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\protocol.py", line 1170, in read_frame frame = await Frame.read( ^^^^^^^^^^^^^^^^^ File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\framing.py", line 69, in read data = await reader(2) ^^^^^^^^^^^^^^^ File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\asyncio\streams.py", line 727, in readexactly raise exceptions.IncompleteReadError(incomplete, n) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyppeteer\connection.py", line 73, in _async_send await self.connection.send(msg) File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\protocol.py", line 635, in send await self.ensure_open() File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\websockets\legacy\protocol.py", line 944, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: sent 1000 (OK); no close frame received

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyppeteer\connection.py", line 79, in _async_send await self.dispose() File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyppeteer\connection.py", line 170, in dispose await self._on_close() File "C:\Users\uesr\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyppeteer\connection.py", line 151, in _on_close cb.set_exception(_rewriteError( asyncio.exceptions.InvalidStateError: invalid state

望指点,谢谢!

drunkdream commented 7 months ago

这种情况会关闭浏览器,然后重试,是重试一直都不能成功吗

290922115 commented 7 months ago

是的,好几本都是卡在某一页,是不是有些章节页数多?谢谢!

---原始邮件--- 发件人: @.> 发送时间: 2023年12月12日(周二) 晚上7:19 收件人: @.>; 抄送: @.**@.>; 主题: Re: [drunkdream/weread-exporter] 反馈:下载不完整、报错,谢谢! (Issue #54)

这种情况会关闭浏览器,然后重试,是重试一直都不能成功吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

shengjiangfeng commented 3 weeks ago

+1

mafeiduoduo commented 3 weeks ago

这种情况会关闭浏览器,然后重试,是重试一直都不能成功吗

我尝试重试过3次,不敢再次尝试了。我不清除是否因为书籍文件比较大或者是内容比较多的原因,我是下载几十页的书籍时是正常的。我也尝试过把-load-timeout=300,依然无效。

shengjiangfeng commented 3 weeks ago

下载不完整的原因是导出逻辑这里有bug, 这边如果有些章节有相关的小章节,在把这个章节加到篇中时,相关的小章节在目录中会丢掉,这个我暂时还没fix