How can I read XML from YouTube? I tried the following.
$xml = new XMLReader();
$xml->open('http://gdata.youtube.com/feeds/api/videos/1uwOL4rB-go');
$r = array();
while($xml->read()) {
$r[] = array($xml->name => $xml->value);
}
I got this far but it doesnt get the necesary info I need like video duration.
The duration is stored in the
yt:durationnode, under themedia:groupaggregate.What language are you using? There are client libraries created by Google for Java, .NET, Python, PHP, and Objective-C. There is also WebService::YouTube on CPAN if you are using Perl.