diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-10 00:03:38 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-10 00:03:38 +0100 |
commit | 4f7c7241e3e5bf0203269d1fa6298c85ab952db1 (patch) | |
tree | 4087f4292d418e63f815a89755fcef1e84082769 /news/GfindFeeds4bot | |
parent | 55f6d44e551289a336bb922cc7c3fe70a5100774 (diff) |
rename knn to news :(
Diffstat (limited to 'news/GfindFeeds4bot')
-rwxr-xr-x | news/GfindFeeds4bot | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/news/GfindFeeds4bot b/news/GfindFeeds4bot new file mode 100755 index 00000000..a5439c5a --- /dev/null +++ b/news/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 |