def _open_file(txt_file):
    """ opening the text file and returning its contents as list """
    url_lines = []
    try:
        with open(txt_file,'r') as fp:
            for line in fp.readlines():
                url_lines.append(line.strip())
    except Exception as e:
        print(f'exception when opening:{txt_file}',e)
        return
    return url_lines