scrapy 2.3 创建项目
在开始抓取之前,你必须建立一个新的零碎项目。输入要在其中存储代码并运行的目录:
scrapy startproject tutorial
这将创建一个 tutorial
目录包含以下内容:
tutorial/
scrapy.cfg # deploy configuration file
tutorial/ # project's Python module, you'll import your code from here
__init__.py
items.py # project items definition file
middlewares.py # project middlewares file
pipelines.py # project pipelines file
settings.py # project settings file
spiders/ # a directory where you'll later put your spiders
__init__.py