0

Here is the script ~ error.py:

import scrapy
class SpidyQuotesViewStateSpider(scrapy.Spider):
    name = 'qlk-viewstate'
    start_urls = ['http://somewebsite.com/search.aspx']
    download_delay = 1.5

From terminal I will execute the following command:

sacredmonkey@sacredmonkey83:~/Desktop$ python2.7 error.py

Output:

Traceback (most recent call last):
  File "error.py", line 2, in <module>
    class SpidyQuotesViewStateSpider(scrapy.Spider):
AttributeError: 'module' object has no attribute 'Spider'

Here is the current version of scrapy that I am running:

sacredmonkey@sacredmonkey83:~/Desktop$ scrapy version -v
Scrapy  : 0.22.2
lxml    : 3.3.3.0
libxml2 : 2.9.1
Twisted : 13.2.0
Python  : 2.7.6 (default, Oct 26 2016, 20:30:19) - [GCC 4.8.4]
Platform: Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty

Here is the scraping tutorial I am trying to follow:
https://blog.scrapinghub.com/2016/04/20/scrapy-tips-from-the-pros-april-2016-edition/

I found this question about the issue, but I have not been able to resolve:
AttributeError: 'module' object has no attribute 'Spider'

Philcinbox
  • 77
  • 2
  • 11

0 Answers0