def gather_line_info(line):
    """
    Gathers movie's name, location and release year from locations.list line. 
    """
    # print(line)
    try:
        movie_name = line.split("\"")[1]
    except IndexError:
        movie_name = line
    year = line[line.index("(")+1:line.index(")")]
    after_year = line[line.index(")") + 1:].strip()
    try:
        after_year = after_year.split("}")[1].strip()
    except IndexError:
        pass
    try:
        after_year = after_year.split("(")[0].strip()
    except IndexError:
        pass
    location = after_year
    location = location.replace(",", "_comma_")
    # location = geolocator.geocode(after_year)
    # print(location)
    # try:
    #     location = str(location.latitude) + " " + str(location.longitude)
    #     print(location)
    # except AttributeError:
    #     location = "ERROR"
    return movie_name, year, location

    # print("MOVIE NAME:", movie_name)
    # print("YEAR:", year)
    # print("LOCATION:", location)