2015-01-17 29 views
-2

所以我運行這個命令 scrapy crawl dmoz -o items.json 我只是不明白什麼-o的意思。我已經研究過,但找不到它。 這是否意味着輸出?我不確定。有關論點含義的簡單問題

謝謝!

+0

'-o'通常是指保存在一個文件的輸出,它是後面的名字文件,即''items.json'。 –

回答

3

我跑scrapy crawl -h得到的選項:

--output=FILE, -o FILE dump scraped items into FILE (use - for stdout) 

完整的幫助:

Run a spider 

Options 
======= 
--help, -h    show this help message and exit 
-a NAME=VALUE   set spider argument (may be repeated) 
--output=FILE, -o FILE dump scraped items into FILE (use - for stdout) 
--output-format=FORMAT, -t FORMAT 
         format to use for dumping items with -o 

Global Options 
-------------- 
--logfile=FILE   log file. if omitted stderr will be used 
--loglevel=LEVEL, -L LEVEL 
         log level (default: DEBUG) 
--nolog     disable logging completely 
--profile=FILE   write python cProfile stats to FILE 
--lsprof=FILE   write lsprof profiling stats to FILE 
--pidfile=FILE   write process ID to FILE 
--set=NAME=VALUE, -s NAME=VALUE 
         set/override setting (may be repeated) 
--pdb     enable pdb on failure 
+0

非常感謝! – Nazariy1995