pick 是一个命令行程序,它允许您从 html 中抓取和“挑选”信息。

安装

$ go get github.com/yields/pick

例子

# pick [removed]s and output sources.

curl --silent https://github.com | pick script :src

# pick and output its text.</code></p> <p><code>echo \" <title>foo \" | pick title --text

# pick all 's in .

curl --silent https://github.com | pick a | pick span

curl --silent https://github.com | pick \" a span \"