我有以下代码:
var request = require("request");
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
request('https://www.google.com/search?client=ubuntu&channel=fs&biw=369&bih=670&tbm=isch&sa=1&ei=1M-9WtHII-q-ggfrhYvQAw&q=ham', function(err, pictures){
var image = new JSDOM(pictures).window.document.getElementsByClassName("rg_ic rg_i")[0].src;
console.log(image);
});
应该发生的是程序使用Google Images搜索“ham”并在控制台中记录第一张图像(恰好位于base64中)的src。我注意到第一个图像的类名称为“rg_ic rg_i”。
但是我没有获得带有图像的渲染页面,所以我得到了:
TypeError: Cannot read property 'src' of undefined
at Request._callback (repl:2:92)
at Request.self.callback (/home/ottor/COMP3161-Meal-Planner/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/home/ottor/COMP3161-Meal-Planner/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
当我期待
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhMTExIVFhUWFRYYGBgWGBgXFxsaGhkaGBgWGBcZICogGBolGxcZITIjJSkuLi4uGB8zODMuNygtLisBCgoKDg0OGxAQGzUmICIyLTAtLysvLS0tLTUtLS0tLS0tLS0tLS0rLS0tLS0tLS0tLzUtLS0tLS0tLS0tLS0tLf/AABEIAMIBAwMBIgACEQEDEQH/xAAcAAEAAgMBAQEAAAAAAAAAAAAABAUDBgcCAQj/xAA9EAABAwMCAwYDBwIFBAMAAAABAAIRAxIhBDEFQVEGEyJhcYEykaEHI0JSscHw0eEUQ2Jy8TODssIVJFP/xAAZAQEAAwEBAAAAAAAAAAAAAAAAAgMEAQX/xAAnEQACAgICAwEAAgEFAAAAAAAAAQIRAyESMQRBUSITkfEFMmFxgf/aAAwDAQACEQMRAD8A7iiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIi+SgPqKufxzTCuNMazBWMfdz4siRI5EgSAd1YSliqPqIiAIiIAiIgCIiAIiIAiI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hp+GAbqzp0gF0iedNQDQsyIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAiIgCIiA+IV8RAfUhEQAL6iIAiIgCIiAIiIAiIgCIiA//2Q==
当我在谷歌图片的控制台中运行相同的JavaScript时,我得到:
有人可以解释我将如何实现这一目标?
答案 0 :(得分:0)
想出来。因此,使用Google几乎是不可能的,因为响应主要是由浏览器执行以填充DOM的javascript。即使我找到了缓解这种情况的方法,对Google服务器的经常性请求也会触发capcha响应。我找到了一种使用Bing图像的方法,所以我现在正在使用它。我正在做一些网页报废来获取图片和其他数据来为我的mysql数据库生成一些我的虚拟数据。