Lztkdr.SeleniumSpider 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Lztkdr.SeleniumSpider --version 0.0.1
NuGet\Install-Package Lztkdr.SeleniumSpider -Version 0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lztkdr.SeleniumSpider" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Lztkdr.SeleniumSpider --version 0.0.1
#r "nuget: Lztkdr.SeleniumSpider, 0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Lztkdr.SeleniumSpider as a Cake Addin
#addin nuget:?package=Lztkdr.SeleniumSpider&version=0.0.1

// Install Lztkdr.SeleniumSpider as a Cake Tool
#tool nuget:?package=Lztkdr.SeleniumSpider&version=0.0.1

一个基于Selenium/Chrome浏览器池的爬虫类库。

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 443 2/3/2022
1.0.1 359 6/10/2021
1.0.0 321 6/10/2021
0.0.2 354 6/10/2021
0.0.2-alpha 211 6/10/2021
0.0.1 338 6/10/2021

# 使用示例:
//最大池为5的谷歌浏览器池,默认先打开百度
using DriverMgr mgr = DriverMgr.Instance("https://www.baidu.com/", 5);
//using DriverMgr mgr = DriverMgr.Instance(5, DriverConfig.Spider("https://www.baidu.com/", null, DeviceType.Pad));
//先尝试关闭所有驱动以及浏览器
//mgr.Dispose();

var lstTask = new List&#60;Task&#62;();
//处理10条数据
for (int j = 0; j < 10; j++)
{
//启动线程
var task = Task.Run(() =>
{
//具体爬取逻辑
mgr.DoWork(driver =>
{
// 业务逻辑
});
});
lstTask.Add(task);
}
Task.WaitAll(lstTask.ToArray());
``