예제 #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
예제 #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
예제 #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
예제 #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
예제 #5
0
파일: telnet.py 프로젝트: 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
예제 #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
예제 #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
예제 #8
0
파일: debug.py 프로젝트: zhangcheng/scrapy
 def dump_stacktrace(self, signum, frame):
     traceback.print_stack(frame)
     print_engine_status()
예제 #9
0
def est(args):
    print_engine_status(ushell.crawler.engine)
예제 #10
0
def est(args):
    print_engine_status(ushell.crawler.engine)