我正在通过Google image downloader抓取图片。最初工作的代码突然停止工作,我们该如何解决这个问题呢?代码和错误消息如下
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')
发布于 2020-05-21 15:16:17
看起来谷歌最近从页面上删除了google_images_download
用来处理raw_html图片的rg_metadata
。正因为如此,它已经坏了。
发布于 2021-06-29 17:52:44
尝试从Ubuntu终端运行py文件。它工作得很好。我认为它在Windows操作系统中不起作用。
https://stackoverflow.com/questions/60137543
复制