Selenium for Researcher (魔改版Selenium)
以简化操作为宗旨,服务没有编程经验的研究者
安装
pip install Selenium4R
基本介绍
希望通过魔改使Selenium的操作更简便,让编程经验的研究者可以更方便地开发Selenium爬虫。为此,我们增强了一些常用的功能,并内置了一些异常的处理方法(当前仅支持Chrome版本)
增加功能:
- 增加对POST请求的支持
- 增加自动下载并缓存WebDriver可执行文件的功能,使Chrome更新不再是烦恼(
webdriver_manager支持)
调整功能:
- 没有定位到标签不再产生
NoSuchElementException异常,而是返回空标签对象(NoneElement);空标签对象的属性均为空,在空标签对象中定位任何对象的返回值均为空标签对象 - 支持多种形式的
executable_path参数,兼容ChromeDriver可执行文件路径、chromedriver环境变量和ChromeDriver缓存地址
一些小改动:
- 移除了
find_element和find_elements方法中by参数的默认值(ID),以免在调用方法时因为不知道存在默认值而造成困扰
待完成功能:
- 调整Selenium设置方法,可通过UserOption自行设置
版本:0.0.3(当前版本暂未正式发布,下一个版本不一定会考虑兼容当前版本)
用法
作者
ChangXing 长行
支持
如果觉得这个项目可以帮到您,欢迎星标哦。
Metadata
Release files for Selenium4R 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Selenium4R-0.1.6.tar.gz | 9.7 kB | Without provenance | Details for Selenium4R-0.1.6.tar.gz |
Release files / Selenium4R-0.1.6.tar.gz
| Download URL | Selenium4R-0.1.6.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f12324744edf02c7d264c91c58a7f41894f477502b07a4b43b0754eef3d13524
|
|
BLAKE2b-256 checksum How to use checksums |
f7fe80ce04258f33b9e9ea68bc739bcf65bab8c11acdec95a8890ed41bc86a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for Selenium4R 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.