Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrapy: No module named 'scrapy.contrib'

Tags:

module

scrapy

I've looked everywhere for a solution to this. I didn't used to have a problem calling "from scrapy.contrib..." but now it throws this error.

File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'scrapy.contrib'

Posting here as a last resort. Any help here would be extremely welcome.

like image 304
john mondego Avatar asked Mar 09 '19 06:03

john mondego


2 Answers

scrapy.contrib has been deprecated for ages now.
It was removed in the 1.6 release of scrapy.

For more details, see https://docs.scrapy.org/en/latest/news.html#deprecation-removals

like image 86
stranac Avatar answered Oct 04 '22 14:10

stranac


from scrapy.linkextractors.sgml import SgmlLinkExtractor

like image 30
kamran kausar Avatar answered Oct 04 '22 14:10

kamran kausar