scrapy 2.3 創(chuàng)建項(xiàng)目

2021-06-09 10:03 更新

在開(kāi)始抓取之前,你必須建立一個(gè)新的零碎項(xiàng)目。輸入要在其中存儲(chǔ)代碼并運(yùn)行的目錄:

scrapy startproject tutorial

這將創(chuàng)建一個(gè) ?tutorial? 目錄包含以下內(nèi)容:

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


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)