问题
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?
回答1:
see scrapy documentation for image pipeline
ITEM_PIPELINES = {'scrapy.contrib.pipeline.images.ImagesPipeline': 1}
来源:https://stackoverflow.com/questions/21318393/automate-downloading-images-off-google