Python之Scrapy爬虫实战--新建scrapy项目

C:\Users\chenmg>workon spider
(spider) C:\Users\chenmg>cd C:\Users\chenmg\PycharmProjects\spider

(spider) C:\Users\chenmg\PycharmProjects\spider>scrapy startproject scrapy_test
New Scrapy project 'scrapy_test', using template directory 'c:\users\chenmg\envs\spider\lib\site-packages\scrapy\templates\project', created in:
    C:\Users\chenmg\PycharmProjects\spider\scrapy_test

You can start your first spider with:
    cd scrapy_test
    scrapy genspider example example.com

(spider) C:\Users\chenmg\PycharmProjects\spider>cd scrapy_test

(spider) C:\Users\chenmg\PycharmProjects\spider\scrapy_test>scrapy genspider mzitu mzitu.com
Created spider 'mzitu' using template 'basic' in module:
  scrapy_test.spiders.mzitu

(spider) C:\Users\chenmg\PycharmProjects\spider\scrapy_test>

启动爬虫

(spider) C:\Users\chenmg\PycharmProjects\spider\scrapy_test>scrapy crawl mzitu

 

你可能感兴趣的:(爬虫,python,scrapy,爬虫,实战,新建项目)