Git Product home page Git Product logo

webnovelbot's People

Contributors

c0rn3j avatar m-haisham avatar mhaisham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

webnovelbot's Issues

Webnovel Guard

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)
  • Email guard support
  • Fix daily FP claim
  • Fix power stone use
  • Fix profile selection
  • Click away preferences window

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.