網址我使用的這個片段,使谷歌的搜索開始給定的名稱:錯誤而返回從節點JS
var parseXlsx = require('excel');
var scraper = require('google-search-scraper');
parseXlsx('foo.xlsx', function(err, data) {
if(err) throw err;
// data is an array of arrays
for(var i=1; i<5; i++){
var stringToSearch = data[i][0];
var options = {
query: stringToSearch,
limit: 1
};
scraper.search(options, function(err, url) {
// This is called for each result
if(err) throw err;
console.log(url)
});
}
});
在foo.xlsx
文件,我有此列:
name1
name2
name3
....
我」總是出現這個錯誤,我不知道爲什麼:
Error: Captcha
at Request._callback (C:\Users\user\node_modules\google-search-scraper\index.js:68:23)
at Request.self.callback (C:\Users\user\node_modules\google-search-scraper\node_modules\request\request.js:122:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (C:\Users\user\node_modules\google-search-scraper\node_modules\request\request.js:888:14)
at emitOne (events.js:101:20)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (C:\Users\user\node_modules\google-search-scraper\node_modules\request\request.js:839:12)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
在此先感謝。
作品我node.js的7.0.0,谷歌搜索刮刀:0.0.3,擅長:0.1.7。也許你只需要更新它們。 – pergy
我有節點js 7.0.0 – OiRc