I have the following code in PHP
PHP Code:
<?php
$query = $_GET['q'];
$URL = ('http://gdata.youtube.com/feeds/api/videos?q='.$query.'&v=2');
$youtube_feed = simplexml_load_file($URL);
foreach ($youtube_feed->entry as $entry) {
$yt = $entry->children('http://gdata.youtube.com/schemas/2007');
$attrs = $yt->statistics->attributes();
echo "Title: " . $entry->title. "<br />";
echo "Author: " . $entry->author->name . "<br />";
echo "Views: " . $attrs['viewCount'] . "<br />";
echo '------------------<br />';
}
?>
And was wondering if it is possible to convert it as such to C#. I can do some of it. Just getting the attribute for 'viewCount' is being a little bit tricky. Here's the API it's scraping the data from.
YouTube Videos matching query: query