我在我的windows10机器上安装了一个脏蜘蛛,它运行得很好!但我的问题是,当它完成最后一个项目时:
device.py, line 142, in parse_details
with open(os.path.join('out', ro_product_model_created+".json"), "w") as f:
OSError: [Errno 22] Invalid argument: 'out\\?? (1.6.0-Nokia ????-Lumia925-TL1263-TL1263-S001-DESAY_TL1263_15012_140611-4.3-18).json'
我使用的是python3.6
^{pr2}$我希望输出不会有任何错误。 它实际上是从json的每一行抓取单独的文件到out文件夹中。在
在命令上运行:
scrapy crawl androiddevice -a sr_term=nokia
谢谢, 宫殿
您没有在此处清理文件名:
您的案例中的}等,这些不是有效的文件名字符
ro_product_model_created
包含{有关清理文件名的信息,请参阅相关问题:Turn a string into a valid filename?
我的个人喜好是:
^{pr2}$相关问题 更多 >
编程相关推荐