cqcn1991
V2EX  ›  问与答

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

  •  
  •   cqcn1991 · Feb 15, 2017 · 1505 views
    This topic created in 3377 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   ·   3011 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 05:29 · PVG 13:29 · LAX 22:29 · JFK 01:29
    ♥ Do have faith in what you're doing.