本文介绍了自动从 Google 下载图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对 Python 非常陌生,我正在尝试创建一个工具来自动从 Google 下载图像.
I'm very new to Python and I'm trying to create a tool that automates downloading images off Google.
到目前为止,我有以下代码:
So far, I have the following code:
import urllib
def google_image(x):
search = x.split()
search = '%20'.join(map(str, search))
url = 'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s&safe=off' %
但我不确定从哪里继续,或者我是否在正确的轨道上.有人可以帮忙吗?
But I'm not sure where to continue or if I'm even on the right track. Can someone please help?
推荐答案
查看图像管道
ITEM_PIPELINES = {'scrapy.contrib.pipeline.images.ImagesPipeline': 1}
这篇关于自动从 Google 下载图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!