Package: linovelib2epub
linovelib2epubCrawl light novel from哔哩轻小说(linovelib)and convert to epub.previewA picture is worth a thousand words. Talk is cheap, show me the real effect.This demo usethis screen recorder toolto record.Featuresflexiblehas_illustrationanddivide_volumeoption for epub outputsupport download a certain volume of a novelbuilt-in http request retry mechanism to improve network fault tolerancebuilt-in random browser user_agent through fake_useragent librarybuilt-in strict integrity check about image downloadbuilt-in mechanism for saving temporary book data by pickle libraryuse multi-process to download imagessupport add custom css style to epubSupported  Websites (plan)序号网站名称语言爬虫难度支持进度备注1哔哩轻小说（Mobile）简/繁中😰:ok:默认选项。2哔哩轻小说（Web）简/繁中😰🚫资源同Mobile，没必要。3轻之国度简/繁高🤣👿🚫需要登录，轻币门槛，导航分类混乱。4无限轻小说繁中😰？不用登录。一章多页。5轻小说文库简/繁中😰？需要登录。一章一页。6轻小说百科简/繁低😆？不用登录，一章一页。遗憾的是插图清晰度低。7真白萌简/繁中😰？需要登录，一章一页。爬虫友好度有两个重要指标：1.访问门槛。是否需要登陆以及积分。2.页面结构。一个章节多页渲染的视为中等难度。如果你发现其他的很好轻小说目标源，资源丰富，更新及时，插图清晰，并且爬虫门槛合理的，可以在issue发起补充。代码实现中对其他轻小说源的支持，关键是继承并重写这个BaseNovelWebsiteSpider类。其他参考：https://github.com/ilusrdbb/lightnovel-pydownloaderUsageinstall from sourceclone this repogitclonehttps://github.com/lightnovel-center/linovelib2epub.gitset up a clean local python venvSee also:creating-virtual-environmentsreplacepywith your real python command if needed. e.g.pythonorpython3.# new a venvpy-mvenvvenv# activate venv.\venv\Scripts\activate# install dependenciespy-mpipinstall-rrequirements.txt# install this package in local# under project root folder: linovelib2epub/python-mpipinstall-e.Now you can use this package as a pypi remote package.fromlinovelib2epub.linovelimportLinovelib2Epub# warning!: must run within __main__ module guard due to process spawn issue.if__name__=='__main__':linovelib_epub=Linovelib2Epub(book_id=3279)linovelib_epub.run()install from pypiInstall this package from pypi:pip install linovelib2epubOr update to the latest version:pip install linovelib2epub --upgradecreate a python file and edit the content as follows:fromlinovelib2epub.linovelimportLinovelib2Epub# warning!: must run within __main__ module guard due to process spawn issue.if__name__=='__main__':linovelib_epub=Linovelib2Epub(book_id=3279)linovelib_epub.run()If it finished without errors, you can see the epub file is under the folder where your python file is located.OptionsParameterstyperequireddefaultdescriptionbook_idnumberYESNone书籍ID。base_urlstringNO'https://w.linovelib.com/novel'哔哩轻小说主页URLdivide_volumebooleanNOFalse是否分卷select_volume_modebooleanNOFalse选择卷模式，它为True时 divide_volume 强制为True。has_illustrationbooleanNOTrue是否下载插图image_download_folderstringNO"images"图片下载临时文件夹. 不允许以相对路径../开头。pickle_temp_folderstringNO"pickle"pickle临时数据保存的文件夹。http_timeoutnumberNO10一个HTTP请求的超时等待时间(秒)。代表connect和read timeout。http_retriesnumberNO5当一个HTTP请求失败后，重试的最大次数。http_cookiestringNO''自定义HTTP cookie。custom_style_coverstringNO''自定义cover.xhtml的样式custom_style_navstringNO''自定义nav.xhtml的样式custom_style_chapterstringNO''自定义每章(?.xhtml)的样式disable_proxybooleanNOTrue是否禁用所在的代理环境，默认禁用Todoquality: setup pytest and codecovquality: setup more formatter and linter for maintainabilityContributorsGokouRuri🐛💻xxxfhy🐛lesfox🐛Holence💻AcknowledgementsbiliNovel2Epub