def start(self): try: httpResponse = getHttpResponse(self.url) self.reReverseIpInfo(httpResponse) logging.getLogger("real_time_info").info(u"成功获取同ip网站信息") except Exception as error: logging.getLogger("real_time_info").info( u"获取同ip网站信息失败, Error:{0}: {1}".format(Exception, error))
def start(self): try: httpResponse = getHttpResponse(self.url) self.reDomainToIpInfo(httpResponse) logging.getLogger("real_time_info").info(u"成功获取域名的IP地址") except Exception as error: logging.getLogger("real_time_info").info( u"获取域名的IP地址失败, Error:{0}: {1}".format(Exception, error))
def start(self): try: httpResponse = getHttpResponse(url=self.url, numRetries=6) self.reIpInfo(httpResponse) self.database.addIpInfo(self.ip, self.country, self.region, self.city, self.idc) logging.getLogger("real_time_info").info(u"成功获取ip信息") except Exception as error: logging.getLogger("real_time_info").info(u"ip信息获取失败, Error: {0}: {1}".format(Exception, error))
def start(self): try: httpResponse = getHttpResponse(self.url) #print(httpResponse) self.reWhois(httpResponse) logging.getLogger("real_time_info").info("成功获取域名的whois信息") except Exception as error: logging.getLogger("real_time_info").info( "获取域名的whois信息失败, Error:{0}: {1}".format(Exception, error))
def start(self): try: httpResponse = getHttpResponse(self.url) self.reSubDomain(httpResponse) self.logger.info(u"成功获取子域名信息") if self.subdomainTitleGet: self.logger.info(u"成功获取子域名对应网站标题信息") except Exception as error: self.logger.info("获取子域名信息失败, Error:{0}: {1}".format( Exception, error))
def getSiteTitle(site): httpResponse = getHttpResponse(site) titlePattren = re.compile(r'<title>(.*?)</title>') title = titlePattren.search(httpResponse) if title: return title.group(1)