def __init__(self, url, lock, timeout=600, depth=2):
        self.START_TIME = time.time()
        #self.lock = lock
        self.TIME_OUT = timeout
        self.LINKS_LIMIT = 20       # max number of links
        self.final_severity = 0
        self.schema, self.host, self.path = self._parse_url(url)
        self.max_depth = self._cal_depth(self.path)[1] + depth     # max depth to scan
        self.check_404()           # check the existence of status 404
        if self._status == -1:
            return None
        if not self.has_404:
            print '[Warning] %s has no HTTP 404.' % self.host
        self._init_rules()
        self.url_queue = Queue.Queue()    # all urls in queue to scan
        self.urls_in_queue = []           # urls already in queue
        _path, _depth = self._cal_depth(self.path)
        self._enqueue(_path)
        self.crawl_index(_path)
        self.lock = threading.Lock()
        self.results = {}
dataset/ETHPy150Open lijiejie/BBScan/BBScan.py/InfoDisScanner.__init__/original