使用媒体管道存储图片,还要安装一个模块
完蛋,芭比Q了,原来使用媒体管道之前还要安装一个模块‘’
pip install Pillow
import scrapy
import re
from ..items import BdImagePipeItem
class BdimgpipeSpider(scrapy.Spider):
name = 'bdimgpipe'
# allowed_domains = ['xxx']
start_urls = ['https://image.baidu.com/search/acjson?tn=resultjson_com&logid=11464945410389410565&ipn=rj&ct=201326592&is=&fp=result&fr=ala&word=%E7%8C%AB%E5%92%AA&queryWord=%E7%8C%AB%E5%92%AA&cl=2&lm=-1&ie=utf-8&oe=utf-8&adpicid=&st=&z=&ic=&hd=&latest=©right=&s=&se
共有 0 条评论