问题遇到的现象和发生背景
scrap没法写入数据
运行结果及报错内容
2022-08-27 11:50:39 [scrapy.utils.log] INFO: Scrapy 2.6.1 started (bot: douban)
2022-08-27 11:50:39 [scrapy.utils.log] INFO: Versions: lxml 4.8.0.0, libxml2 2.9.12, cssselect 1.1.0, parsel 1.6.0, w3lib 1.21.0, Twisted 22.2.0, Python 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)], pyOpenSSL 21.0.0 (OpenSSL 1.1.1n 15 Mar 2022), cryptography 3.4.8, Platform Windows-10-10.0.22000-SP0
2022-08-27 11:50:39 [scrapy.crawler] INFO: Overridden settings:
{'BOT_NAME': 'douban',
'NEWSPIDER_MODULE': 'douban.spiders',
'SPIDER_MODULES': ['douban.spiders']}
2022-08-27 11:50:39 [scrapy.utils.log] DEBUG: Using reactor: twisted.internet.selectreactor.SelectReactor
2022-08-27 11:50:39 [scrapy.extensions.telnet] INFO: Telnet Password: 5b0e6e7057794a1c
2022-08-27 11:50:39 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.telnet.TelnetConsole',
'scrapy.extensions.logstats.LogStats']
2022-08-27 11:50:39 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.retry.RetryMiddleware',
'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',
'scrapy.downloadermiddlewares.stats.DownloaderStats']
2022-08-27 11:50:39 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
'scrapy.spidermiddlewares.referer.RefererMiddleware',
'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
'scrapy.spidermiddlewares.depth.DepthMiddleware']
2022-08-27 11:50:39 [scrapy.middleware] INFO: Enabled item pipelines:
['douban.pipelines.DoubanPipeline']
2022-08-27 11:50:39 [scrapy.core.engine] INFO: Spider opened
2022-08-27 11:50:39 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2022-08-27 11:50:39 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2022-08-27 11:50:39 [scrapy.core.engine] DEBUG: Crawled (403) <GET https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4> (referer: None)
2022-08-27 11:50:40 [scrapy.core.engine] DEBUG: Crawled (403) <GET https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4?start=20&type=T> (referer: https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4)
2022-08-27 11:50:40 [scrapy.core.engine] DEBUG: Crawled (403) <GET https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4?start=40&type=T> (referer: https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4?start=20&type=T)
2022-08-27 11:50:40 [scrapy.core.engine] DEBUG: Crawled (403) <GET https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4?start=60&type=T> (referer: https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4?start=40&type=T)
2022-08-27 11:50:40 [scrapy.core.engine] INFO: Closing spider (finished)
2022-08-27 11:50:40 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 1215,
'downloader/request_count': 4,
'downloader/request_method_count/GET': 4,
'downloader/response_bytes': 1144,
'downloader/response_count': 4,
'downloader/response_status_count/403': 4,
'elapsed_time_seconds': 0.660902,
'finish_reason': 'finished',
'finish_time': datetime.datetime(2022, 8, 27, 3, 50, 40, 407250),
'httpcompression/response_bytes': 584,
'httpcompression/response_count': 4,
'log_count/DEBUG': 5,
'log_count/INFO': 10,
'request_depth_max': 3,
'response_received_count': 4,
'scheduler/dequeued': 4,
'scheduler/dequeued/memory': 4,
'scheduler/enqueued': 4,
'scheduler/enqueued/memory': 4,
'start_time': datetime.datetime(2022, 8, 27, 3, 50, 39, 746348)}
2022-08-27 11:50:40 [scrapy.core.engine] INFO: Spider closed (finished)
我想要达到的结果
能够写入