Skip to main content

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 长行

支持

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Selenium4R-0.1.6.tar.gz (9.7 kB view details)

Uploaded Source

File details

Details for the file Selenium4R-0.1.6.tar.gz.

File metadata

  • Download URL: Selenium4R-0.1.6.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for Selenium4R-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f12324744edf02c7d264c91c58a7f41894f477502b07a4b43b0754eef3d13524
MD5 60795cffe84e9e8d3a53cd592d5ee321
BLAKE2b-256 f7fe80ce04258f33b9e9ea68bc739bcf65bab8c11acdec95a8890ed41bc86a70

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page