-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] The content of [url] is Empty and content_id =acontentz. #45
Comments
|
注意查看文档的更新,https://github.com/lightnovel-center/linovelib2epub?tab=readme-ov-file#linovelibmobile 现在繁体版必须显式指定 target 来进行请求。 from linovelib2epub import Linovelib2Epub, TargetSite
if __name__ == "__main__":
linovelib_epub = Linovelib2Epub(
book_id=2264,
select_volume_mode=True,
log_level="DEBUG",
target_site=TargetSite.LINOVELIB_MOBILE_TRADITIONAL,
# 是否挂代理取决于你的网络环境,我这边需要挂代理才能正常访问 bilinovel 的繁体版网站
# 你那边应该是不需要的,可以注释掉下面这行
# disable_proxy=False
)
linovelib_epub.run() |
我的錯,添加 要不要考慮把 |
防呆和方便不可兼得。 因为默认请求的目标是简体版网站,所以不需要指定。而需要繁体版的需要显式指定。 默认目标只有一个,而网站版本有两个,因此不可能同时满足两个版本的用户。 我不同意防呆设计,强制参数的话,使用文档中options那个表,如果全部都是防呆的强制参数,这个软件我自己都不会去用,太麻烦了。我之所以把使用的API设计的非常简单,就是因为我就想简单运行,按需调整。 这个设计也符合一般软件的设计原则,当默认设置不能满足你时,修改设置的主动权在于你。 |
或許可以考慮在錯誤訊息中提及
|
可以,后续我会改下这个情况出现时的文本描述。发生这个issue是存在多个可能的原因的:
这两种情况都会造成无法正常抓取正文内容。我会尽量在log中就近给出提示。因为最好的文档肯定也不是readme,而是近在咫尺的log提示。 感谢你的反馈和建议。 |
Describe the bug(描述这个BUG)
A clear and concise description of what the bug is.
跳出的瀏覽器正常顯示,但錯誤訊息卻顯示為空。
To Reproduce(复现步骤)
复现的代码以及操作(例如分支选择、卷选择等等)
python 檔案
執行
log 檔
Expected behavior(期望的行为)
A clear and concise description of what you expected to happen.
可以正常抓取內容
Screenshots or Video(截图或者视频录制)
If applicable, add screenshots to help explain your problem.
錯誤前有正常顯示網頁
linovelib2epub-20240424-0216.mp4
Environment(软件环境)
The text was updated successfully, but these errors were encountered: