import json


def load_speeddial(file_path):
    """
    Load the bookmark entries from Vivaldi's speed dial and return as
    dictionary
    """
    # read bookmark file
    with open(file_path, encoding="UTF-8") as jfile:
        bookmarks = json.load(jfile)

    # access speed dial
    speeddial = bookmarks["roots"]["bookmark_bar"]["children"][0]["children"]
    return {x["id"]: x["name"] for x in speeddial if x["type"] == "url"}