robots:在Go中解析robots.txt文件

时间:2021-05-17 18:08:10
【文件属性】:
文件名称:robots:在Go中解析robots.txt文件
文件大小:17KB
文件格式:ZIP
更新时间:2021-05-17 18:08:10
Go 机器人 该软件包以Go编程语言为Robots Exclusion Protocol提供了robots.txt解析器。 该实现遵循。 该代码简单明了。 此程序包公开的结构仅包含基本数据类型,因此可以使用Go的encoding程序包之一轻松对其进行编码和解码。 尽管性能不是设计目标,但此程序包绝不应该成为程序的瓶颈。 安装 跑步 go get github.com/slyrz/robots 例子 robots := robots . New ( file , "your-user-agent" ) if robots . Allow ( "/some/path" ) { // Crawl it! // ... } 执照 机器人是根据MIT许可发布的。 您可以在文件中找到MIT许可证的副本。
【文件预览】:
robots-master
----testdata()
--------test01.txt(920B)
--------test06.txt(290B)
--------test03.txt(662B)
--------test10.txt(668B)
--------test07.txt(161B)
--------test09.txt(446B)
--------benchmark.txt(26KB)
--------test05.txt(120B)
--------test08.txt(239B)
--------test11.txt(333B)
--------test04.txt(409B)
--------test02.txt(515B)
----robots.go(9KB)
----LICENSE(1KB)
----README.md(880B)
----robots_test.go(2KB)

网友评论