diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-09 23:58:38 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-09 23:58:38 +0100 |
commit | 940e77f47d7c3d874053eeab17054f6b10e63a12 (patch) | |
tree | a8fc851d0c72d5ce0101db56826d41d2e8dfb735 /knn/GfindFeeds4bot | |
parent | b5f1c347900b21a07674f2132e4dac2fb1dc99ea (diff) |
rename ircbot to knn (krebs news network)
Diffstat (limited to 'knn/GfindFeeds4bot')
-rwxr-xr-x | knn/GfindFeeds4bot | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/knn/GfindFeeds4bot b/knn/GfindFeeds4bot new file mode 100755 index 00000000..a5439c5a --- /dev/null +++ b/knn/GfindFeeds4bot @@ -0,0 +1,17 @@ +#! /bin/sh +# usage: GfindFeeds4bot QUERY +set -euf + +export query="$1" +export data="$( + curl -sS "https://www.google.com/uds/GfindFeeds?v=1.0&q=$query" +)" + +node <<EOF + query = process.env.query + data = JSON.parse(process.env.data) + + data.responseData.entries.forEach(function (entry, index) { + console.log(query + index + '|' + entry.url) + }) +EOF |