Scrapy各項命令說明


關於Scrapy這個爬蟲框架,方塊字的資料實在是少。這幾天查資料的時候看到了些有用處的文字,記錄在此,以作備忘。

You have to execute it in your 'startproject' folder. You will have another commands if it finds your scrapy.cfg file. You can see the diference here:

$ scrapy startproject bar
$ cd bar
/
$ ls
bar  scrapy
.cfg
$ scrapy
Scrapy0.12.0.2536- project: bar

Usage:
  scrapy
<command>[options][args]

Available commands:
  crawl        
Start crawling from a spider or URL
  deploy        
Deploy project inScrapyd target
  fetch        
Fetch a URL using the Scrapy downloader
  genspider    
Generatenew spider using pre-defined templates
  list          
List available spiders
  parse        
Parse URL (using its spider)andprint the results
  queue        
Deprecated command.SeeScrapyd documentation.
  runserver    
Deprecated command.Use'server' command instead
  runspider    
Run a self-contained spider (without creating a project)
  server        
StartScrapyd server forthis project
  settings      
Get settings values
  shell        
Interactive scraping console
  startproject  
Createnew project
  version      
PrintScrapy version
  view          
Open URL in browser,as seen byScrapy

Use"scrapy <command> -h" to see more info about a command


$ cd
..
$ scrapy
Scrapy0.12.0.2536-no active project

Usage:
  scrapy
<command>[options][args]

Available commands:
  fetch        
Fetch a URL using the Scrapy downloader
  runspider    
Run a self-contained spider (without creating a project)
  settings      
Get settings values
  shell        
Interactive scraping console
  startproject  
Createnew project
  version      
PrintScrapy version
  view          
Open URL in browser,as seen byScrapy

Use"scrapy <command> -h" to see more info about a command


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM