Created
December 23, 2020 04:20
-
-
Save chavarera/00909f43cf2d4548eab035a93e90d7ba to your computer and use it in GitHub Desktop.
scrapy different way to debug scrapy code
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
#Default debugger | |
import pdb; pdb.set_trace() | |
# Use scrapy Logging | |
self.logger.info('this is Simple Log') | |
self.log('this is log example') | |
# Inspect in Shell | |
from scrapy.shell import inspect_response | |
inspect_response(response,self) | |
# Open Response in browser | |
from scrapy.utils.response import open_in_browser | |
open_in_browser(response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment