• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

爬取京东商品时只爬取部分图片

2019-10-25 20:12:49 [scrapy.pipelines.files] ERROR: File (unknown-error): Error processing file from  referred in
Traceback (most recent call last):
  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\files.py", line 419, in media_downloaded
    checksum = self.file_downloaded(response, request, info)
  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 102, in file_downloaded
    return self.image_downloaded(response, request, info)
  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 106, in image_downloaded
    for path, image, buf in self.get_images(response, request, info):
  File "D:\Anaconda\lib\site-packages\scrapy\pipelines\images.py", line 120, in get_images
    orig_image = Image.open(BytesIO(response.body))
  File "D:\Anaconda\lib\site-packages\PIL\Image.py", line 2818, in open
    raise IOError("cannot identify image file %r" % (filename if filename else fp))
OSError: cannot identify image file
2019-10-25 20:12:49 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/response_bytes': 526052,
'downloader/response_count': 31,
'downloader/response_status_count/200': 31,
'file_count': 30,
'file_status_count/downloaded': 30,
'finish_reason': 'finished',
'finish_time': datetime.datetime(2019, 10, 25, 12, 12, 49, 806768),
'item_scraped_count': 30,
'log_count/DEBUG': 420,
'log_count/ERROR': 30,
'log_count/INFO': 9,
'offsite/domains': 1,
'offsite/filtered': 2,
'request_depth_max': 1,
'response_received_count': 31,
'scheduler/dequeued': 1,
'scheduler/dequeued/memory': 1,
'scheduler/enqueued': 1,
'scheduler/enqueued/memory': 1,
'start_time': datetime.datetime(2019, 10, 25, 12, 12, 33, 906859)}
2019-10-25 20:12:49 [scrapy.core.engine] INFO: Spider closed (finished)

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

发新帖

发布任务需求已有1031166位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!