V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cqcn1991
V2EX  ›  问与答

所以 scrapy 都不能 overwrite 输出的文件?

  •  
  •   cqcn1991 · Feb 15, 2017 · 1468 views
    This topic created in 3358 days ago, the information mentioned may be changed or developed.

    在用脚本跑 scrapy, 大概代码这样

    结果,发现每次内容输出都是 append 上去的,还不能重写。查了一下,貌似一直如此....

    http://stackoverflow.com/questions/40327665/how-to-enable-overwriting-a-file-everytime-in-scrapy-item-export

    所以大家都是怎么解决这个问题的?

    1 replies    2017-02-16 15:24:01 +08:00
    julyclyde
        1
    julyclyde  
       Feb 16, 2017
    没明白你的意思。 append 到哪儿?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4041 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 00:51 · PVG 08:51 · LAX 17:51 · JFK 20:51
    ♥ Do have faith in what you're doing.