How can I run the scrapy shell emulation inside PyCharm IPython console? I want to keep the ability to run snippets of code from editor by Alt+Shift+E
4
votes
2 Answers
5
votes
I got it working by running the following python snippet:
from scrapy.cmdline import execute
import sys
sys.argv = ['scrapy', 'shell', 'http://scrapy.org']
execute()
If you get the following error:
MultipleInstanceError: Multiple incompatible subclass instances of InteractiveShellEmbed are being created.
then you have to add to the scrapy.cfg the following line:
shell=python
