Git Product home page Git Product logo

seleniumlogin's Introduction

SeleniumLogin

APIs for loginning some websites using <selenium>.
You can star this repository to keep track of the project if it's helpful for you, thank you for your support.

Documents

preparing

Support List

Websites Core Codes in Chinese
Bilibili click B站
Taobao click 淘宝

Install

Pip install

run "pip install SeleniumLogin"

Source code install

(1) Offline
Step1: git clone https://github.com/CharlesPikachu/SeleniumLogin.git@master
Step2: cd SeleniumLogin -> run "python setup.py install"
(2) Online
run "pip install git+https://github.com/CharlesPikachu/SeleniumLogin.git@master"

Quick Start

Noted

To use this repo, you have to install Chrome Browser and download chromedriver from:
http://npm.taobao.org/mirrors/chromedriver/

Examples

from SeleniumLogin import login
lg = login.Login()
username, browser = lg.bilibili(username=xxx, password=xxx, chromedriverpath=xxx)
username, browser = lg.taobao(username=xxx, password=xxx, chromedriverpath=xxx)

More

WeChat Official Accounts

Charles_pikachu
img

seleniumlogin's People

Contributors

charlespikachu avatar

Stargazers

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

Watchers

 avatar  avatar

seleniumlogin's Issues

淘宝登录滑块失效获取不到滑块

	# 检查是否出现了滑动验证码
	try:
		slider = browser.find_element_by_xpath("//span[contains(@class, 'btn_slide')]")
		if slider.is_displayed():
			ActionChains(browser).click_and_hold(on_element=slider).perform()
			ActionChains(browser).move_by_offset(xoffset=258, yoffset=0).perform()
			ActionChains(browser).pause(0.5).release().perform()
	except:
		pass

其中 if 判断一直为false,但是滑块出现了
问题出现在:slider = browser.find_element_by_xpath("//span[contains(@Class, 'btn_slide')]") 这段代码

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.