Scrapy problems with items file

Viewed 27

Hi there I am learning Scrapy and now I am trying to use the file items.py

  1. Firstly this is my Structure

enter image description here

inside of "items.py", I have the class named "SaraItem" where I am saving the information. enter image description here

following the tutorial's suggestion," it says" I should use from .. items import CLASSNAME(created in items.py) however, I got the error no " No module named 'main.items'; 'main' is not a package"

I have been looking for some tutorials and they suggest

  1. from SARA_WEBSITE.website_craw.items import SaraItem - No module named
  2. from website_craw.items import SaraItem - No module named
  3. Move the item.py to the same folder (to spiders folder)
  4. use from sys import path and then add the directory - but it didn't work -
  5. change my Spider_module, NewSpider_module (actually now is 'sara.spiders')
  6. from future import absolute_import - ValueError relative import beyond top-level-package

I truly appreciate all your feedback and suggestions

0 Answers
Related