Jump to content

[HELP] How to get this data from yt video?


Recommended Posts

I wanna get remaining time from the video, but does not working.. Why?

function callback(data, error)
    if (error ~= 0) then
        return outputChatBox(error)
    if (data == "ERROR") then
        return outputChatBox("data error")
    local data = fromJSON("["..data.."]")
    if (data) then
	local minutes, seconds = convertTime(tonumber(data.length))
	if seconds < 10 then 
		seconds = "0"..seconds
        outputChatBox("Title: "..data.title)
        outputChatBox("Length: "..minutes..":"..seconds )
        outputChatBox("Remaining: "..data.remaining)
        loadBrowserURL( browser, data.link  )


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...