我正在通过谷歌图像下载程序抓取图像。 最初有效的代码开始突然停止工作 我们如何解决这个问题?代码和错误消息如下所示
from google_images_download import google_images_download
def ImageCrawling(keyword, dir):
response = google_images_download.googleimagesdownload()
arguments = {"keywords":keyword
,"limit":2
,"print_urls":True
,'output_directory':dir}
paths = response.download(arguments) #passing the arguments to the function
print(paths) #printing absolute paths of the downloaded images
ImageCrawling('dog','C:\\nuguya')
谷歌最近似乎从页面中删除了
rg_metadata
,这就是google_images_download
用来处理原始html中的图像的地方。 就这样,它坏了尝试从Ubuntu终端运行py文件。它很好用。我认为它在Windows操作系统中不起作用
相关问题 更多 >
编程相关推荐