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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With