小白爬虫scrapy第一篇

如果想先学习python的话推荐看下Python基础教学|菜鸟教程这个网站的教程,里面的内容还是挺不错的非常适合小白学习
好了废话不多说开始学习如何安装scrapy吧
安装我上篇小白爬虫篇简介下面的链接安装包后,在cmd 或者 在 Window PowerShell 中输入命令:

pip install scrapy

过程中可能会问你是否安装其他扩展包选 按y 回车就好了
安装完成后在看看是否安装成功
输入以下命令:

scrapy -V

成功后面会出现版本和使用命令与简介,如下:

Scrapy 1.3.3 - no active project

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

Available commands:
  bench         Run quick benchmark test
  commands
  fetch         Fetch a URL using the Scrapy downloader
  genspider     Generate new spider using pre-defined templ
  runspider     Run a self-contained spider (without creati
  settings      Get settings values
  shell         Interactive scraping console
  startproject  Create new project
  version       Print Scrapy version
  view          Open URL in browser, as seen by Scrapy

  [ more ]      More commands available when run from proje

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

接下来就是创建项目与剩下的代码了
请看下篇

    原文作者:猴子
    原文地址: https://segmentfault.com/a/1190000012425610
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞