Skip to main content

Webnovel Bot

Webnovel Bot and scraper written in one, optimized for speed.

Provides multiple choices of access for tasks

Install

pip install webnovelbot

or

warning: this method requires prior installation of browser-cookie3

pip install git+https://github.com/mHaisham/webnovelbot.git

Sample

follow the link for an example usage

Signin

there are a few hiccups that one may encounter during signing in to webnovel

  • Captcha: During the signin process user can be asked to fill in a google captcha

  • Guard: After clicking the signin button the form can redirect the user to a guard website

you can handle them in different ways, signin method takes a variable manual which defaults to False. Behaviour of the function changes depending on it.

manual=False

When manual is false signin would throw exceptions corresponding to the situation

try:
    webnovel.signin(USER_EMAIL, USER_PASS)
except CaptchaException: 
    pass
except GuardException:
    pass

Read more on handling Guard

manual=True

When manual is true the process would be expecting user input during the above mentioned situations.

It would by default wait 10 minutes for user input before throwing a TimeoutException.

You may define a custom time by setting webnovel.user_timeout

Cookies

Webnovelbot supports using cookies from other web browsers in both selenium and api using class Cookies

It currently supports all browsers supported by browser_cookie3

chrome firefox opera edge chromium

from webnovel import WebnovelBot, Cookies
from webnovel.api import ParsedApi

webnovel = WebnovelBot(timeout=360)

cookiejar = Cookies.from_browser('chrome')

# this will load the cookie jar into selenium
# depending on what you want to do after, you may want to reload the page
webnovel.add_cookiejar(cookiejar)

# this will create the api with the cookie jar
api = ParsedApi(cookiejar)

Cookies extends from RequestsCookieJar hence can be used as a replacement for it and vice-versa

Conversion tools

from webnovel.tools import UrlTools

UrlTools provides methods to convert and from novel_id, chapter_id, and profile_id to their respective urls

Analytics

Supports multiple analytic tools with an easily extensible interface

Read more

Goals

Primary focus of development is to reduce the usage of selenium.

Metadata

Release files for webnovelbot 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webnovelbot 0.3.0
File Size Uploaded
webnovelbot-0.3.0.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webnovelbot 0.3.0
File Interpreter ABI Platform
webnovelbot-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.7 kB

Release files / webnovelbot-0.3.0.tar.gz

Download URL webnovelbot-0.3.0.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
014dee9aa636aae992cfe0bde5205a72e3d58318f7eac9a39a0d594c25186c4c
BLAKE2b-256 checksum
How to use checksums
558db7081ffddc7e12c3053b44295f1fa888faf8a08f4d80053dcfb654fe0495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

Release files / webnovelbot-0.3.0-py3-none-any.whl

Download URL webnovelbot-0.3.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f45bbcd1dc3155a61027b5a694d666b3b876154f91a3f68f400ffbb2592f0b18
BLAKE2b-256 checksum
How to use checksums
275c8ee6cb00f5e7bee987046f3a51364c441b40a79b706eba6b2bfc2691cb26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.9

2 release files

0.2.8

1 release file

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page