laughingclouds / Scrapia-World

A web scraper for scraping wuxiaworld. Written in python, using selenium and python cmd for an interactive shell experience with a command line utility to work with text along with a database to store information.
MIT License
2 stars 1 forks source link

new login method #9

Closed laughingclouds closed 2 years ago

laughingclouds commented 2 years ago

Previously WW had it's own login page. Now we must click on the login button after visiting the homepage. There we need to click on a button lel

Thankfully, it's the first button of the webpage. Hence, below code will return the button we need.

document.getElementsByTagName("button")[0];

We can click it

document.getElementsByTagName("button")[0].click();

And then click on the login button. lel

Using this script

let btnList = document.getElementsByTagName("button");

for (let btn of btnlist) {
  if (btn.innerText.toLowerCase() == "log in") {
    btn.click();
  }
}

And so, the final script will become.

document.getElementsByTagName("button")[0].click();
let btnList = document.getElementsByTagName("button");

for (let btn of btnlist) {
  if (btn.innerText.toLowerCase() == "log in") {
    btn.click();
  }
}

We just need to get to the homepage, and run this script in the console. After that the method to enter email and password should be the same.

laughingclouds commented 2 years ago

40c82139ffbf7ce29e3191cea317072974670c73 Done