码迷,mamicode.com
首页 > 其他好文 > 详细

创建爬虫

时间:2017-11-01 20:30:34      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:set   setting   item   bsp   ide   url   tutorial   pipeline   命令   

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

创建爬虫

标签:set   setting   item   bsp   ide   url   tutorial   pipeline   命令   

原文地址:http://www.cnblogs.com/zhengzhe/p/7768113.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!