Ejemplo n.º 1
0
    def download_found(self):
        # Put all the found urls into a queue for the threads to read from
        self.queue = Queue()
        [self.queue.put(url) for url in FileHelper.read_file('urls.txt')]

        # Create the threads and wait for them to finish
        self.create_threads()

        for t in self.threads:
            t.join()
Ejemplo n.º 2
0
    def __init__(self, sitename, file):
        self.queue = Queue()
        [self.queue.put(url) for url in FileHelper.read_file(file)]

        self.result = UrlResult(sitename)
Ejemplo n.º 3
0
 def __init__(self, url, content, path):
     self.url = url
     self.content = content
     self.result = UrlResult(url)
     self.words = FileHelper.read_file(path)