import json


def load_entities(path):
    """
    Load the entities and return an dict carrying all relevant info
    """
    try:
        with open(path) as file:
            entities = json.loads(file.read())

            ents = {}

            for e in entities['entities']:
                ents[e['entity']] = {'opening hours':e['opening hours'],
                                     'location':e['location'],
                                     'contact':e['contact'],
                                     'link':e['link']
                                    }
        return ents      

    except FileNotFoundError:
        print("Entities file not found.")
        return {}