def _get_telnet_vars(self): # Note: if you add entries here also update topics/telnetconsole.rst telnet_vars = { 'engine': self.crawler.engine, 'spider': self.crawler.engine.spider, 'slot': self.crawler.engine.slot, 'crawler': self.crawler, 'extensions': self.crawler.extensions, 'stats': self.crawler.stats, 'settings': self.crawler.settings, 'est': lambda: print_engine_status(self.crawler.engine), 'p': pprint.pprint, 'prefs': print_live_refs, 'hpy': hpy, 'help': "This is Scrapy telnet console. For more info see: " "https://doc.scrapy.org/en/latest/topics/telnetconsole.html", } self.crawler.signals.send_catch_log(update_telnet_vars, telnet_vars=telnet_vars) return telnet_vars
def get_vars(crawler): rpyc_vars = { 'engine': crawler.engine, 'spider': crawler.engine.spider, 'slot': crawler.engine.slot, 'crawler': crawler, 'extensions': crawler.extensions, 'stats': crawler.stats, 'settings': crawler.settings, 'est': lambda: print_engine_status(crawler.engine), 'prefs': print_live_refs, 'hpy': hpy, } crawler.signals.send_catch_log(update_rpyc_vars, rpyc_vars=rpyc_vars) return rpyc_vars
def get_vars(crawler): rpyc_vars = { "engine": crawler.engine, "spider": crawler.engine.spider, "slot": crawler.engine.slot, "crawler": crawler, "extensions": crawler.extensions, "stats": crawler.stats, "settings": crawler.settings, "est": lambda: print_engine_status(crawler.engine), "prefs": print_live_refs, "hpy": hpy, } crawler.signals.send_catch_log(update_rpyc_vars, rpyc_vars=rpyc_vars) return rpyc_vars
def _get_telnet_vars(self): # Note: if you add entries here also update topics/telnetconsole.rst telnet_vars = { "engine": self.crawler.engine, "spider": self.crawler.engine.spider, "slot": self.crawler.engine.slot, "crawler": self.crawler, "extensions": self.crawler.extensions, "stats": self.crawler.stats, "settings": self.crawler.settings, "est": lambda: print_engine_status(self.crawler.engine), "p": pprint.pprint, "prefs": print_live_refs, "help": "This is Scrapy telnet console. For more info see: " "https://docs.scrapy.org/en/latest/topics/telnetconsole.html", } self.crawler.signals.send_catch_log(update_telnet_vars, telnet_vars=telnet_vars) return telnet_vars
def _get_telnet_vars(self): # Note: if you add entries here also update topics/telnetconsole.rst telnet_vars = { 'engine': self.crawler.engine, 'spider': self.crawler.engine.spider, 'slot': self.crawler.engine.slot, 'crawler': self.crawler, 'extensions': self.crawler.extensions, 'stats': self.crawler.stats, 'settings': self.crawler.settings, 'est': lambda: print_engine_status(self.crawler.engine), 'p': pprint.pprint, 'prefs': print_live_refs, 'hpy': hpy, 'help': "This is Scrapy telnet console. For more info see: " \ "http://doc.scrapy.org/en/latest/topics/telnetconsole.html", } self.crawler.signals.send_catch_log(update_telnet_vars, telnet_vars=telnet_vars) return telnet_vars
def _get_telnet_vars(self): # Note: if you add entries here also update topics/telnetconsole.rst slots = self.crawler.engine.slots if len(slots) == 1: spider, slot = slots.items()[0] telnet_vars = { 'engine': self.crawler.engine, 'spider': spider, 'slot': slot, 'manager': self.crawler, 'extensions': self.crawler.extensions, 'stats': stats, 'spiders': self.crawler.spiders, 'settings': self.crawler.settings, 'est': lambda: print_engine_status(self.crawler.engine), 'p': pprint.pprint, 'prefs': print_live_refs, 'hpy': hpy, 'help': "This is Scrapy telnet console. For more info see: " \ "http://doc.scrapy.org/topics/telnetconsole.html", # see #284 } send_catch_log(update_telnet_vars, telnet_vars=telnet_vars) return telnet_vars
def dump_stacktrace(self, signum, frame): traceback.print_stack(frame) print_engine_status()
def est(args): print_engine_status(ushell.crawler.engine)