import json


def get_movie_data(movies_datafile_path):
    """ Given a trailer url, return the youtube id 

        Args:
        movies_datafile_path: full path to input file

        Returns:
        the movies data represented as a dictionary, otherwise None

    """

    movies = None
    with open(movies_datafile_path, "r") as movie_data_file:
        try:
            movie_data = json.load(movie_data_file)
        except:
            print("Error: Unable to parse json input file")
        else:
            if ("movies" in movie_data):
                movies = movie_data["movies"]

    return movies