From f8e35057d45617633024cf15068f14f4513bd31a Mon Sep 17 00:00:00 2001 From: juhanishen Date: Fri, 30 Jan 2015 21:51:12 +0200 Subject: [PATCH] try to add amazon book search, NOT FUNCTIONING VERSION try to add amazon book search, no any result coming when making search. Already one hour. --- lib/amazon-book.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/amazon-book.js diff --git a/lib/amazon-book.js b/lib/amazon-book.js new file mode 100644 index 0000000..c9a2ac5 --- /dev/null +++ b/lib/amazon-book.js @@ -0,0 +1,21 @@ +{ + search: [ + { + type:'link', + query:'http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Dstripbooks&field-keywords={{term}}', + translate:'parseHTML(response)', + name:{ + selector:'#result_0 .a-text-normal', + expression:'$(element).text()' + }, + link:{ + selector:'#result_0 .a-link-normal', + expression:'"http://www.amazon.com/" + $(element).getAttribute("href")' + }, + description:{ + selector:'#result_0 .a-text-normal', + expression:'$(element).text()' + } + } + ] +} \ No newline at end of file