ModuleNotFoundError: No module named 'Scrapy'

旧巷老猫 提交于 2019-12-06 11:54:59

You are incorrectly importing the scrapy module.

Find a simple tutorial and references from here.

You have to do the following changes:

import scrapy # Change here


class NgaSpider(scrapy.Spider): # Change here too
    name = "NgaSpider"
    host = "http://bbs.ngacn.cc/"
    start_urls = [
        "http://bbs.ngacn.cc/thread.php?fid=406",
    ]


    def parse(self, response):
        print ("response.body")

Assuming you are using 1.3 version of it.

To check use

pip show scrapy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!