Exemplo n.º 1
0
def readFile(logger, pattern, now, path, mags):
    magazines = None
    reader = FileReader(pattern, path)
    if pattern.endswith(".html") == True and reader.validate_url(path) == True:
        magazines = reader.read_html_page(path)
    else:
        magazines, listOfArticles = reader.execute_with_params(
            pattern, path, mags)
    results = dict()
    logger.info("Read all the magazines (it took " + str(now) +
                "), now send them to arpa")
    mini = reader.getMinLength()
    maxi = reader.getMaxLength()
    return results, magazines, mini, maxi