Scrapy-create-project

提供:Dev Guides
移動先:案内検索

スクレイピー-プロジェクトを作成する

説明

Webページからデータをスクラップするには、まずコードを保存するScrapyプロジェクトを作成する必要があります。 新しいディレクトリを作成するには、次のコマンドを実行します-

scrapy startproject first_scrapy

上記のコードは、first_scrapyという名前のディレクトリを作成し、次の構造が含まれます-

first_scrapy/
scrapy.cfg            # deploy configuration file
first_scrapy/        # project's Python module, you'll import your code from here
__init__.py
items.py              # project items file
pipelines.py          # project pipelines file
settings.py           # project settings file
spiders/             # a directory where you'll later put your spiders
__init__.py