下载ChromeDriver的工具。

get-chromedriver的Python项目详细描述


获取ChromeDriver

PyPI - Python VersionPyPIPyPI - StatusPyPI - License

下载ChromeDriver的工具。您可以选择下载最新的beta版本(如果当前有), 最新的稳定版本或特定版本。 您可以将此工具用作包导入或命令行应用程序。在

安装

要安装:

$ pip install get-chromedriver

要升级:

^{pr2}$

使用

包导入

fromget_chromedriverimportGetChromeDriver# Platforms to choose from: 'win', 'linux' or 'mac'get_driver=GetChromeDriver(platform='win')# Print the latest stable release versionprint(get_driver.latest_stable_release_version())# Print the latest stable release download linkprint(get_driver.latest_stable_release_url())# Print the download link of a specific releaseprint(get_driver.release_url('84.0.4147.30'))# Download the latest stable driver release# Optional: use output_path='' to specify where to download the driver# Optional: use extract=True to extract the zip fileget_driver.download_latest_stable_release(output_path='webdriver',extract=True)# Download the latest stable driver release# Optional: use output_path='' to specify where to download the driver# Optional: use extract=True to extract the zip fileget_driver.download_release('84.0.4147.30',extract=True)

命令行

打印所有平台的稳定发布url:

$ get-chromedriver --latest-urls

打印稳定版本:

$ get-chromedriver --stable-version

打印特定平台的稳定发布url:

$ get-chromedriver --stable-url linux

下载特定平台的稳定版本:

$ get-chromedriver --download-stable win

下载特定平台的特定版本并提取zip文件:

$ get-chromedriver --download-release mac 84.0.4147.30 --extract

下载的驱动程序默认下载位置:

<current directory>/<get-chromedriver_downloads>/<release version>/<platform>/<chromedriver.zip>

注意:与Beta版本相关的选项和函数只有在当前可用的情况下才有效。

选项

--help                      Show help.

--beta-version              Print the beta release version.

--stable-version            Print the stable release version.

--latest-urls               Print the beta and stable release urls for all platforms.

--release-url               Print the url of a release for a platform.

--beta-url                  Print the beta release url for a platform.

--stable-url                Print the stable release url for a platform.

--download-beta             Download the beta release for a platform.

--downlaod-stable           Download the stable release for a platform.

--downlaod-release          Download a release.

--extract                   Option to extract the zip file.

--version                   Program version.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java类/接口中的编码风格默认注释和元信息   java列表不为空,但poll方法返回null   java无法在安卓中设置视图   java在游戏中后台运行计数器线程   带有ForEach迭代问题的Java流   java OpenApi(Swagger 3.0)Codegen缺少验证   JAVAlang.RuntimeException:无法传递结果ResultInfo需要安卓。准许读取外部存储器或grantUriPermissio   新Java Spring启动项目应用程序引擎部署失败,错误代码为13   用户输入的java验证   如何使用java将连续的JSON对象转换为csv   java正则表达式以删除所有不可打印字符   如何告诉编译器在Android应用程序中使用Kotlin扩展函数而不是Java 8函数   java你能制作Tomcat 6标准吗。日志文件的行为是否像log4j DailRollingFileAppender?   当使用操作符重载时,在闭包中或甚至在方法中更新时,不会发生对我的列表的java更新   java错误解析jar上带有入口点创建的文件参数错误