def get_links_in_file(root_dir, filename):
    # Returns a list of all the links in a file.
    f = open(root_dir + filename, 'r')
    lines = f.readlines()
    f.close()

    links_to_check = []
    for line in lines:
        if 'a href' in line:
            for link in get_links_in_line(line):
                # Ignore anchor tags for now
                if 'html' in link:
                    links_to_check.append(link)
    return links_to_check
dataset/ETHPy150Open ehmatthes/intro_programming/tests/test_links.py/get_links_in_file/original