diff options
author | tv <tv@nomic.retiolum> | 2014-01-04 03:12:34 +0100 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2014-01-04 03:12:34 +0100 |
commit | 2a730efca62a76d7344ad6bcaf0fa38acf925cdc (patch) | |
tree | 0463a6d808827d4e30582afc9c172748076fe6a8 | |
parent | b537b19d827f49f86f29dec21116dd960721efb4 (diff) |
ircbot GfindFeeds4bot: initial commit
-rwxr-xr-x | ircbot/GfindFeeds4bot | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ircbot/GfindFeeds4bot b/ircbot/GfindFeeds4bot new file mode 100755 index 00000000..a5439c5a --- /dev/null +++ b/ircbot/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 |