'Produces URLs from our data source, hands them in to the consumer.'

def ProduceURLs(self, consumer):

    (frame, file) = OpenFileForRead(self._path, 'ACCESSLOG')
    if (not file):
        return
    for line in file.readlines():
        if self._encoding:
            line = encoder.WidenText(line, self._encoding)
        line = line.strip()
        if ((not self._is_clf) and (not self._is_elf)):
            self._is_elf = self.RecognizeELFLine(line)
            self._is_clf = self.RecognizeCLFLine(line)
        match = None
        if self._is_elf:
            match = self.GetELFLine(line)
        elif self._is_clf:
            match = self.GetCLFLine(line)
        if (not match):
            continue
        url = URL()
        url.TrySetAttribute('loc', match)
        consumer(url, True)
    file.close()
    if frame:
        frame.close()
