文件名称:crawler:包爬虫递归爬取 URI,返回 URI 到 sha1 哈希的映射
文件大小:5KB
文件格式:ZIP
更新时间:2024-07-13 21:13:12
Go
爬虫 包爬虫以递归方式爬取 URI,返回 URI 到 sha1 哈希的映射。 用法 package main import ( "fmt" "github.com/weisjohn/crawler" ) func main () { resources := crawler . Crawl ( "http://johnweis.com" ) for uri , hash := range resources { fmt . Printf ( "hash: %s , uri: %s \n " , hash , uri ) } } 输出 $ go run example-crawler.go 2b9d012d65efdd9635416a950d0654db5649d852 : http://johnweis.com/static/cs
【文件预览】:
crawler-master
----LICENSE(1KB)
----README.md(3KB)
----crawl.go(4KB)
----crawl_test.go(5KB)