Exemple #1
0
    def __init__(self, depth, count, cur_url, storage_dir):
        self.url = cur_url
        self.q = Queue()
        self.depth = depth
        self.listOfThreads = []
        self.q.put((self.url, 0))
        self.path = storage_dir

        for i in xrange(count):
            t = Thread(self.todo())
            t.signal = True
            t.daemon = True
            self.listOfThreads.append(t)
Exemple #2
0
    def __init__(self, depth, count, cur_url, storage_dir):
        self.url = cur_url[0]
        self.q = Queue()
        self.depth = depth
        self.listOfThreads = []
        self.q.put((self.url, 0))
        print cur_url
        for i in xrange(1, len(cur_url)):
            self.q.put((cur_url[i], 0))
        self.path = storage_dir
        self._stop = threading.Event()

        for i in xrange(count):
            t = Thread(self.todo())
            t.signal = True
            t.daemon = True
            self.listOfThreads.append(t)
Exemple #3
0
    def __init__(self, depth, count, cur_url, storage_dir):
        self.url = cur_url[0]
        self.q = Queue()
        self.depth = depth
        self.listOfThreads = []
        self.q.put((self.url, 0))
        print cur_url
        for i in xrange(1, len(cur_url)):
            self.q.put((cur_url[i], 0))
        self.path = storage_dir
        self._stop = threading.Event()

        for i in xrange(count):
            t = Thread(self.todo())
            t.signal = True
            t.daemon = True
            self.listOfThreads.append(t)