本文假設在你已安裝好python和scrapy。
第一步,進入shell:
C:\>scrapy startproject spider
輸出結果:
C:\>scrapy startproject spider
New Scrapy project 'spider', using template directory 'c:\\program files\\python36\\lib\\site-packages\\scrapy\\templates\\project', created in:
C:\spider
You can start your first spider with:
cd spider
scrapy genspider example example.com
創建成功,目錄結構:
C:\>tree /f spider
卷 Windows 10 的文件夾 PATH 列表
卷序列號為 00000028 02DE:BFF0
C:\SPIDER
│ scrapy.cfg
│
└─spider
│ items.py
│ middlewares.py
│ pipelines.py
│ settings.py
│ __init__.py
│
├─spiders
│ │ __init__.py
│ │
│ └─__pycache__
└─__pycache__
本文由ISMY博客發佈
閱讀更多 最後一個NPE 的文章