Open ffaffAHA opened 9 months ago
def handle_log(self, message):
with open("%s.log" % self._book_id, "a+", encoding='utf-8') as fp:
fp.write("[%s] %s\n" % (self._url, message.text))
最后一页卡住的问题 https://github.com/drunkdream/weread-exporter/issues/43#issue-1847700573
[x] 章节较大的话,浏览器会重启。建议开--headless
另外结合其他同学的错误使用我使用是
)
parser.add_argument(
"--load-timeout", help="load chapter page timeout", type=int, default=300,
)
parser.add_argument(
"--load-interval", help="load chapter page interval time", type=int, default=20,
)
parser.add_argument(
"--css-file", help="overide default css style",
)
parser.add_argument(
"--headless", help="chrome headless", action="store_true", default=False
)
parser.add_argument(
"--force-login", help="force login first", action="store_true", default=False
)
命令是
python -m weread_exporter -b 书籍ID -o pdf --load-timeout=300 --headless --load-interval=20
真的很感谢作者,亚马逊中国不让买书了,Zlibrary也找不到那本书,微信读书是最后的办法了emm。 (我要找的那本书是英语单词书,真的需要纸质版更方便些)
我尝试一下,感谢分享。
我尝试一下,感谢分享。
我的是windows系统,你试一试吧。
@ffaffAHA 多谢多谢!!pull一下吧,应该能帮到大家。
- [x] 暂时就解决了,webpage.py 232行 添加了utf-8,因为gbk识别不了一些字符
def handle_log(self, message): with open("%s.log" % self._book_id, "a+", encoding='utf-8') as fp: fp.write("[%s] %s\n" % (self._url, message.text))
- 最后一页卡住的问题 有些书最后一页下载不了 #43 (comment)
- [x] 章节较大的话,浏览器会重启。建议开
--headless
另外结合其他同学的错误使用我使用是
) parser.add_argument( "--load-timeout", help="load chapter page timeout", type=int, default=300, ) parser.add_argument( "--load-interval", help="load chapter page interval time", type=int, default=20, ) parser.add_argument( "--css-file", help="overide default css style", ) parser.add_argument( "--headless", help="chrome headless", action="store_true", default=False ) parser.add_argument( "--force-login", help="force login first", action="store_true", default=False )
命令是
python -m weread_exporter -b 书籍ID -o pdf --load-timeout=300 --headless --load-interval=20
编码Fix已合入#59
我用了楼主的命令,结果还是不行
[2024-01-15 22:13:22,951][INFO][WeReadExporter] Check chapter 20/插图
[2024-01-15 22:13:22,953][INFO][WeReadExporter] File cache\54c32520715e229954c8b8a\chapters\2-20.md not exist
[2024-01-15 22:13:22,953][INFO][WeReadWebPage] Go to chapter 20
[2024-01-15 22:13:22,958][INFO][WeReadWebPage] Fetch url https://weread.qq.com/web/reader/54c32520715e229954c8b8ak98f3284021498f137082c2e
[2024-01-15 22:13:23,505][INFO][WeReadWebPage] Fetch url https://midas.gtimg.cn/midas/minipay_v2/jsapi/cashier.js
[2024-01-15 22:13:23,506][INFO][WeReadWebPage] Fetch url https://cdn.weread.qq.com/web/wpa.js
[2024-01-15 22:13:23,507][INFO][WeReadWebPage] Fetch url https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/css/app.3e110853.css
[2024-01-15 22:13:23,508][INFO][WeReadWebPage] Fetch url https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/js/app.e7373bc5.js
Traceback (most recent call last):
File "
书籍已经购买。 用的命令是 python -m weread_exporter -b 339321e0813ab6d0fg019228 -o epub -o pdf --load-timeout=300 然后Ctrl+C结果是这样的