def stopline(line):
    """Verify is a line contains a invalid string"""
    badstrings = [ "gallica.bnf.fr", "luizgusmao@bol.com.br", "prepared by",
                   "produced by", "project by", "proofreading", "this etext is",
                   "was produced", "www.pgdp.net", "available by", "produced from",
                   "google print", "google book", "nacional de lisboa.", "de lisboa.",
                   "provided by", "bnd.bn.pt", "the online distributed",
                   "library of portugal", "edited by", "nacional de portugal",
                   "the original version", "project gutenberg", "a partir da digitaliza",
                   "this file was", "scanned images of", "print project",
                   "diponibilizadas pela biblioteca digital", "distributed proofreaders",
                   "this book was", "blogspot.com", "imagens de obras em dom",
                   "biblioteca digital", "book search", "by cornell university", "search)",
                   "digital collections", "internet archive", "disponibilizada pela bibria",
                   "purl.pt", "created from images", "library.utoronto.ca",
                   "file which includes", "www.gutenberg.org", "-h.htm", "of public domain",
                   "thanks to", "dicionario-aberto.net", "de material em dom",
                   "da universidade do minho", "portugal).)", "project.)", "heritage library",
                   "coimbra university", "almamater.uc.pt", "digital do alentejo",
                   "free literature", "free sources for", "made available", "bodleian library",
                   "educational materials", "online soon", "bibliotheca nacional digital",
                   "acervo digital", "images from",
                 ]
    for bad in badstrings:
        if bad in line.lower():
            return True

    return False