0

How should I use get_channel_tags() or what function should I use of SimplePie to get totalResults of YouTube rss playlist or other element/attribute in the channel/header section of the feed?

Example playlist: http://gdata.youtube.com/feeds/api/playlists/PL25BD62C6275E88F6?alt=rss

This does not work:

$totalResults = $rss->get_channel_tags('http://a9.com/-/spec/opensearchrss/1.0/', 'totalResults');
$totalResultsData = $totalResults[0];
PoseLab
  • 1,841
  • 1
  • 16
  • 22

1 Answers1

0

I did not get it to work, but if I use the Atom feed it works with the function get_feed_tags().

This works:

Playlist: http://gdata.youtube.com/feeds/api/playlists/PL25BD62C6275E88F6?alt=atom (You can delete ?alt=atom parameter because it is used by default)

$totalResults = $rss->get_feed_tags('http://a9.com/-/spec/opensearch/1.1/', 'totalResults');
$totalResultsData = $totalResults[0]['data']; 
PoseLab
  • 1,841
  • 1
  • 16
  • 22