Get video details
$get video details is a function that retrieves the details of a YouTube video using its video ID.
This function provides information about a video such as its title, description, number of views, likes and dislikes, and much more.
Parameters
Video Id: This is the unique identifier for the YouTube video whose details are to be retrieved. The video ID can be found in the video's URL.
Return Value
This function returns a string of the video's details. The details are returned in a JSON format.
Example
connect to youtube("path/to/your/client secret.json") set(#video detail,$get video details("dQw4w9WgXcQ"),"Global")
The script above connects to YouTube using the client secret file "client secret.json". Please replace "path/to/your/" with the actual path to your client secret file.
It uses the "$get video details" function to retrieve the details of the YouTube video with the ID "dQw4w9WgXcQ", and stores it in the global variable '#video detail'.
You can now use the '#video detail' variable to access all the details of this video in your scripts. Since the details are returned in a JSON format, you can use various functions or methods in your programming language to parse the JSON and extract the information you need.
Note: Some details like view count, like count, dislike count, comment count, etc. may not be accurate because of the way YouTube updates these metrics. They are updated from time to time and may not reflect the real-time count.