Exemplo n.º 1
0
 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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
Arquivo: telnet.py Projeto: 01-/scrapy
 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
Exemplo n.º 6
0
 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
Exemplo n.º 7
0
 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
Exemplo n.º 8
0
 def dump_stacktrace(self, signum, frame):
     traceback.print_stack(frame)
     print_engine_status()
Exemplo n.º 9
0
def est(args):
    print_engine_status(ushell.crawler.engine)
Exemplo n.º 10
0
def est(args):
    print_engine_status(ushell.crawler.engine)