def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() log.msg(format="Telnet console listening on %(host)s:%(port)d", level=log.DEBUG, host=h.host, port=h.port)
def start_listening(self): check_sql = "select * from spider_spiderinfo where name=%s" insert_sql = "insert into spider_spiderinfo (name,ip,port,status) values ('%s','%s','%s','START')" update_sql = "update spider_spiderinfo set ip='%s',port='%s',status='START' where name='%s'" self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() ip_address = GetLocalIP.get_ip_address('enp3s0') port = h.port self.spider_name = self.crawler.engine.spider.name spider_name = self.spider_name try: self.cursor.execute(check_sql, (spider_name, )) check_result = len(self.cursor.fetchall()) if check_result != 0: self.cursor.execute(update_sql % (ip_address, port, spider_name)) self.db_connection.commit() else: self.cursor.execute(insert_sql % (spider_name, ip_address, port)) self.db_connection.commit() except Exception as e: print Exception, ":", e logger.info("Telnet console listening on %(host)s:%(port)d", { 'host': h.host, 'port': h.port }, extra={'crawler': self.crawler})
def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() log.msg(format='Web service listening on %(host)s:%(port)d', level=log.DEBUG, host=h.host, port=h.port)
def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() logger.debug("Telnet console listening on %(host)s:%(port)d", { 'host': h.host, 'port': h.port }, extra={'crawler': self.crawler})
def engine_started(self): # Start server endpoint for exporting metrics self.promtheus = listen_tcp(self.port, self.host, self) # Periodically update the metrics tsk = task.LoopingCall(self.update) self.tasks.append(tsk) tsk.start(self.interval, now=True)
def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() logger.info( "Telnet console listening on %(host)s:%(port)d", {"host": h.host, "port": h.port}, extra={"crawler": self.crawler}, )
def start_listening(self): resource = WebSocketResource(self) # serve files from ./client root = File(STATIC_FILES) root.putChild(b"ws", resource) site = Site(root) self.port = listen_tcp(self.portrange, self.host, site) h = self.port.getHost() self.logger.debug("Inspectr available on %(host)s:%(port)d", {'host': h.host, 'port': h.port}, extra={'crawler': self.crawler}) if self.crawler.settings.get('INSPECTR_AUTOSTART', None): webbrowser.open('http://{}:{}'.format(h.host, h.port))
def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() logger.debug("Telnet console listening on %(host)s:%(port)d", {'host': h.host, 'port': h.port}, extra={'crawler': self.crawler})
def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) h = self.port.getHost() log.msg("Web service listening on %s:%d" % (h.host, h.port), log.DEBUG)
def start_listening(self): self.port = listen_tcp(self.portrange, self.host, self) logger.debug( 'Web service listening on {host.host:s}:{host.port:d}'.format( host=self.port.getHost()))
def start_listening(self): self.port = listen_tcp(self.port_range, self.host, self) h = self.port.getHost() logger.debug('listening on %(host)s: %(port)d', {'host': h.host, 'port': h.port})