Automate downloading images off Google

梦想与她 提交于 2019-12-11 00:49:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!