Last active
September 9, 2020 20:51
-
-
Save ttilberg/d060749a02413f0abf73901cf3af13c2 to your computer and use it in GitHub Desktop.
Scrapy debugging in VSCode made easy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scrapy.cmdline import execute | |
try: | |
execute( | |
[ | |
'scrapy', | |
'crawl', | |
'spidername', | |
# '-a', | |
# 'some_attr=some_value | |
# '-s', | |
# 'HTTPCACHE_ENABLED=true', # This can be uncommented for caching | |
# '-o', | |
# 'out.csv', | |
] | |
) | |
except SystemExit: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Python: debug_runner.py", | |
"type": "python", | |
"request": "launch", | |
"program": "${workspaceFolder}/debug_runner.py", | |
"console": "integratedTerminal" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment