Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Yotube Video Title & Description

Is it possible to obtain the title and description of a Youtube video from the xml link below using Quick Macros?

I had a look in the help file for reading XML but I was completley lost. :|


Function YouTubeGetVideoInfo
Copy      Help
function $videoID [str&title] [str&description] [str&author]

;Gets YouTube video title, description, author.
;Error if fails.

;videoID - video URL part that in video URL usually is after v=.
;title, description, author - variables that receive video info. Can be 0.

;str title description author
;YouTubeGetVideoInfo "ZooYDKIDOaQ" title description author
;out F"title:[]{title}[]description:[]{description}[]author:[]{author}"

str s
IntGetFile F"{videoID}" s

IXml x=CreateXml
if(&title) title=x.Path("entry/title").Value
if(&description) description=x.Path("entry/content").Value
if(&author) author=x.Path("entry/author/name").Value

err+ end _error
Thanks Gintaras! Big Grin

Forum Jump:

Users browsing this thread: 1 Guest(s)