Tool to convert webnovel to epub
Project description
NovelSave
Tool to convert novels to epub
v0.6.+ is not compatible with previous versions
Install
pip install novelsave
or
pip install git+https://github.com/mHaisham/novelsave.git
Usage
Update a novel
novelsave novel https://www.webnovel.com/book/my-disciples-are-all-villains_16984011906162405 -u -p -c
Check/Update configurations
novelsave config
novelsave config -d novels
Save directory
Novels are by default saved to folder novels
in user home
Help
novelsave --help
usage: novelsave [-h] [-v] {novel,config,list} ...
tool to convert novels to epub
positional arguments:
{novel,config,list}
novel download, update, and delete novels
list manipulate currently existing novels
config update and view user configurations
optional arguments:
-h, --help show this help message and exit
-v, --verbose extra information
novelsave novel --help
usage: novelsave novel [-h] [-u] [-p] [-c] [--meta META] [--remove-meta] [--force-cover] [--force-create] [--force-meta] [--username USERNAME]
[--password PASSWORD] [--force-login] [--use-cookies USE_COOKIES] [--threads THREADS] [--timeout TIMEOUT] [--limit LIMIT]
url
positional arguments:
url novel url or identifier for downloading novels
optional arguments:
-h, --help show this help message and exit
--threads THREADS number of download threads
--timeout TIMEOUT webdriver timeout
--limit LIMIT amount of chapters to download
actions:
-u, --update update novel details
-p, --pending download pending chapters
-c, --create create epub from downloaded chapters
--meta META metadata source url
--remove-meta remove current metadata
--force-cover download and overwrite the existing cover
--force-create force create epub
--force-meta force update metadata
auth:
--username USERNAME username or email field
--password PASSWORD password field; not recommended, refer to README for more details
--force-login remove existing cookies and login
--use-cookies USE_COOKIES
use cookies from specified browser
novelsave list --help
usage: novelsave list [-h] [--novel NOVEL] [--reset] [--full]
optional arguments:
-h, --help show this help message and exit
--novel NOVEL takes the url of the novel and displays meta information
--reset remove chapters and metadata. to be used with --novel
--full remove everything including compiled epub files. to be used with --reset
novelsave config --help
usage: novelsave config [-h] [-d DIR]
optional arguments:
-h, --help show this help message and exit
-d DIR, --dir DIR directory for saving novels
Login and cookies
Two methods of accessing authenticated content are provided
Browser cookies
Recommended method of access
Uses cookies from available browsers access content
use syntax --use-cookies [browser]
. for example
novelsave novel https://www.webnovel.com/book/my-disciples-are-all-villains_16984011906162405 -u -p -c --use-cookies firefox
Requires to be Signed in, in the browser of choice
Available
chrome
firefox
chromium
opera
edge
Login
Username and password are sent to the website server to authenticate.
Cookies are now persisted and stored at config's location.
Novelsave attempts to use the available cookies unless:
-
any of the cookies from relevant domains are expired
-
user provides the flag
--force-login
refer to sources to check supported sites.
Manual
Pass a url to the NovelSave
class which will select the correct source for it.
from novelsave import NovelSave
if __name__ == '__main__':
save = NovelSave(url)
Methods
NovelSave
has 6 methods
update(self, force_cover=False):
metadata(self, url, force=False):
remove_metadata(self, with_source=True):
download(self, thread_count=4, limit=None):
create_epub(self, force=False):
def login(self, cookie_browser: Union[str, None] = None, force=False):
Database
you can access the database by using the db
attribute of NovelSave
save.db
Sources
Request a new source by creating a new issue
Metadata Sources
Request a new source by creating a new issue
Metadata Source | Support |
---|---|
wlnupdates.com | ✔ |
novelupdates.com | ✔ |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for novelsave-0.6.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b22c1b5090935fe682812379219862f8ebc8eba6ef78f0d81f41a9010d0ae0c |
|
MD5 | eba701488a9f5a8053fdf15fd2dd200b |
|
BLAKE2b-256 | 175d997e96196d73d2265f4c0b96e7f6e0f26765dd24aa5e9a3548609449e00a |