Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var google = require('google')
- google.resultsPerPage = 3
- var nextCounter = 0
- var textract = require('textract');
- question = "Which app did Apple name 'App of the Year' for 2016"
- function getSearchResults(question, cb) {
- google(question, function (err, res) {
- if (err) console.error(err)
- content =
- for (var i = 0; i < Math.min(res.links.length, 3); ++i) {
- var link = res.links[i];
- url = link.href;
- textract.fromUrl(url, function( error, text ) {
- });
- }
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement