Giter VIP home page Giter VIP logo

selenium4r's Introduction

Selenium for Researcher (魔改版Selenium)

以简化操作为宗旨,服务没有编程经验的研究者

安装

pip install Selenium4R

基本介绍

希望通过魔改使Selenium的操作更简便,让编程经验的研究者可以更方便地开发Selenium爬虫。为此,我们增强了一些常用的功能,并内置了一些异常的处理方法(当前仅支持Chrome版本)

增加功能:

  1. 增加对POST请求的支持
  2. 增加自动下载并缓存WebDriver可执行文件的功能,使Chrome更新不再是烦恼(webdriver_manager支持)

调整功能:

  1. 没有定位到标签不再产生NoSuchElementException异常,而是返回空标签对象(NoneElement);空标签对象的属性均为空,在空标签对象中定位任何对象的返回值均为空标签对象
  2. 支持多种形式的executable_path参数,兼容ChromeDriver可执行文件路径、chromedriver环境变量和ChromeDriver缓存地址

一些小改动:

  1. 移除了find_elementfind_elements方法中by参数的默认值(ID),以免在调用方法时因为不知道存在默认值而造成困扰

待完成功能:

  1. 调整Selenium设置方法,可通过UserOption自行设置

版本:0.0.3(当前版本暂未正式发布,下一个版本不一定会考虑兼容当前版本)

用法

作者

ChangXing 长行

支持

如果觉得这个项目可以帮到您,欢迎星标哦。

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.