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

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

http://gdata.youtube.com/feeds/api/videos/ZooYDKIDOaQ

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

Regards,

Paul
#2
Function YouTubeGetVideoInfo
Code:
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.

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


str s
IntGetFile F"http://gdata.youtube.com/feeds/api/videos/{videoID}" s

IXml x=CreateXml
x.FromString(s)
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
#3
Thanks Gintaras! Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)