import requests


def get_video_info(video_id=""):
    """Get the dictionnary of info (fron Tournesol API) for a video from it's ID"""

    # Get video info dictionary
    print("Call API with video_id: ", video_id)
    response = requests.get(f"https://tournesol.app/api/v2/videos/?video_id={video_id}").json()

    if response["count"]:
        video_dict = response["results"][0]
        print("The video has been found on Tournesol.")
        return video_dict
    else:
        print("The video has not been found on Tournesol!")
        return 0