1.创建项目

命令行到文件路径下,

scrapy startproject tutorial

产生目录

tutorial/

  scrapy.cfg

  tutorial/

    __init__.py

    items.py

    settings.py

    middlewares.py

    pipelines.py

    spiders/

      _init_.py

      。。。。

 

2.编写spider

scrapy genspider 爬虫名 初始URL #初始URL可以修改

 

3.定义item

posted on 2017-11-01 19:44  郑哲  阅读(141)  评论(0编辑  收藏  举报