Selenops
2.0.1

欢迎来到Selenops ,Selenops,迅速的网络爬网。
给定一个网页URL和一个要搜索的单词,Selenops将在该页面中查找所述单词,以及递归中链接的所有页面。
import Selenops
// Initialize crawler.
let crawler = Crawler (
startURL : URL ( string : " https://fivestars.blog/ " ) ! ,
maximumPagesToVisit : 10 ,
wordToSearch : " Swift " // Specify the word to search here.
)
// Set delegate.
crawler . delegate = ... // Needs to conform to CrawlerDelegate
// Start crawling!
crawler . start ( ) crawler代表将获取诸如访问的网页之类的信息,并且在其中找到了指定单词的网页。
Selenops是通过Swift Package Manager分发的:
要将其用于应用程序,请遵循本教程,并使用此存储库URL: https://github.com/zntfdr/Selenops.git 。
要在包装中使用它,请将其添加为Package.swift中的依赖项。swift:
let package = Package (
...
dependencies : [
. package ( url : " https://github.com/zntfdr/Selenops.git " , from : " 2.0.0 " )
] ,
targets : [
. target (
...
dependencies : [ " Selenops " ] )
] ,
...
) ...然后在必要时使用import Selenops 。

Selenops还带有一个命令行工具,可展示其功能。
要安装它,请克隆项目并运行make:
$ git clone https://github.com/zntfdr/Selenops.git
$ cd Selenops
$ makeSelenops是由Federico Zanetello建造的,是Swift剧本的一个例子。
欢迎和鼓励所有用户成为该项目的积极参与者的持续开发 - 通过修复他们遇到的任何错误,或者无论如何缺少其遇到的任何错误,或改进文档。
如果您想进行更改,请打开拉动请求,即使它只包含您计划的更改的草稿,或者是重现问题的测试。
谢谢,请享受使用Selenops !