【文件属性】:
文件名称:crawler:Go 中的 URL 爬虫
文件大小:35KB
文件格式:ZIP
更新时间:2021-06-28 17:09:10
Go
###To run the server 下面的命令将从拉取最新的 Docker 镜像,将其构建到容器中,并通过端口 8080 运行它。
docker run --publish=8080:8080 rmulley/crawler
###如何抓取网址要提交要抓取的网址,您需要将有效的 JSON 发布到服务器,如下所示。
curl http:// 192.168 . 59.103 : 8080 \
-X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' -d '
{
" urls " : [
" http://www.docker.com " ,
" http://www.cnn.com " ,
" http://www.yahoo.com/ "
]
}'
【文件预览】:
crawler-master
----src()
--------main.go(8KB)
----Dockerfile(546B)
----LICENSE(1KB)
----README.md(3KB)
----Makefile(382B)
----_vendor()
--------src()
----.gitignore(266B)