m-haisham / webnovelbot Goto Github PK
View Code? Open in Web Editor NEWAutomate your webnovel interactions
License: Apache License 2.0
Automate your webnovel interactions
License: Apache License 2.0
You can add downloader for image novel
Example https://www.webnovel.com/comic/buggy-bug_13743374805062401
webnovel = WebnovelBot(timeout=360)
NOVEL = 'https://www.webnovel.com/book/book-name_123456789'
webnovel.driver.get(NOVEL)
novel_id = webnovel.novel_id
webnovel.signin(email, password)
claim_daily(webnovel, NOVEL)
Sometimes guard is required, which it looks like the library doesn't handle(I also had to do reCaptcha in this example) and will redirect to:
https://passport.webnovel.com/guard.htmlhttps://passport.webnovel.com/emaillogin.html&sessionKey=abcdef&encry=longkeywithlotsof%s&email=myemail
EDIT: And actually if I do get through the guard, I get stuck anyways
claim_daily(webnovel, NOVEL)
File "/home/c0rn3j/test.py", line 12, in claim_daily
bot.claim_tasks()
File "/home/c0rn3j/.local/lib/python3.9/site-packages/webnovel/decorators/signin.py", line 16, in __call__
return self.__wrapped__(self.__self__, *args, **kwargs)
File "/home/c0rn3j/.local/lib/python3.9/site-packages/webnovel/bot.py", line 453, in claim_tasks
self._focus_profile()
File "/home/c0rn3j/.local/lib/python3.9/site-packages/webnovel/bot.py", line 507, in _focus_profile
profile_button = self.driver.find_element_by_css_selector("div[class^='g_user'][class*='_hover']")
File "/home/c0rn3j/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 598, in find_element_by_css_selector
return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
File "/home/c0rn3j/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/home/c0rn3j/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/c0rn3j/.local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"div[class^='g_user'][class*='_hover']"}
(Session info: chrome=88.0.4324.182)
claim_daily is as per example, just reordered.
def claim_daily(bot, novel=None):
# claim daily fast pass
bot.claim_tasks()
bot.energy_vote([1])
bot.power_vote()
import time
time.sleep(5)
if novel is not None:
bot.driver.get(novel)
I want to make a bot that will claim the daily login bonuses and was wondering if this library is still functional
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.