14, February 2012

parsing youtube uRSS - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: parsing youtube uRSS
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: parsing youtube uRSS  (Read 2678 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« on: Apr 17, 2007, 10:02:51 pm »

Hi,

my youtube is messed up, time to write a real youtube parser Smiley

I the RSS resource site from you tube is really good for listings and each item holds all information you need on your website.

I thought about to parse for every new request the RSS feed (don't accept big performance problems in the beginning)

but what if the user click a link to see a detail with the video?

what is the best way to pass that information to the next page? or is better to store the data in a database?


Last blog : A new Wordpress theme for our blog
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Apr 17, 2007, 10:04:34 pm »

I hope I 'm looking on the right source page:

http://www.youtube.com/rssls


Last blog : A new Wordpress theme for our blog
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Apr 17, 2007, 10:05:48 pm »

I think I got the answer...

http://www.youtube.com/dev_docs


Last blog : A new Wordpress theme for our blog
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Apr 17, 2007, 10:10:10 pm »

I think I got the answer...

http://www.youtube.com/dev_docs

but inside the result is no .swf link Sad


Last blog : A new Wordpress theme for our blog
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #4 on: Apr 18, 2007, 08:19:19 pm »

Ok, let's start over. What is your problem now? Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Apr 18, 2007, 08:29:25 pm »

Ok, let's start over. What is your problem now? Smiley
hehe, I start a website using their RSS feeds and will see if this information is enough for my needs...


Last blog : A new Wordpress theme for our blog
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #6 on: Apr 18, 2007, 08:42:29 pm »

Ok, here is the solution :

$embed ereg_replace("',)",'',array_pop(explode('?v='$item['guid'])));

echo 
'<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/'.$embed.'"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'.$embed.'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>';
?>


I would explain it more, but I know you understand how to use it Wink


Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Apr 18, 2007, 08:47:58 pm »

sure but I can access the XML via dom or after parsing with magpie as an array, using the rss there is no html code Smiley


Last blog : A new Wordpress theme for our blog
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #8 on: Apr 18, 2007, 08:50:40 pm »

This example is for use with magpie (or any other RSS reader you like)

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Apr 18, 2007, 08:53:42 pm »

This example is for use with magpie (or any other RSS reader you like)

you don't need it check the node you got from the RSS: (I think you're using the api)

Code:
<item>
<author>rss@youtube.com (guitar90)</author>
<title>guitar</title>
<link>http://youtube.com/?v=QjA5faZF1A8</link>
<description>
<![CDATA[
<img src="http://sjl-static4.sjl.youtube.com/vi/QjA5faZF1A8/2.jpg" align="right" border="0" width="120" height="90" vspace="4" hspace="4" />
<p>
this guy iz great!!!
</p>
<p>
Author: <a href="http://youtube.com/profile?user=guitar90">guitar90</a><br/>
Keywords:  <a href="/results?search_query=guitar">guitar</a><br/>
Added: December 20, 2005<br/>
</p>
]]>
</description>
<guid isPermaLink="true">http://youtube.com/?v=QjA5faZF1A8</guid>
<pubDate>Tue, 20 Dec 2005 05:08:43 -0800</pubDate>

<media:player url="http://youtube.com/?v=QjA5faZF1A8" />
<media:thumbnail url="http://sjl-static4.sjl.youtube.com/vi/QjA5faZF1A8/2.jpg" width="120" height="90" />
<media:title>guitar</media:title>
<media:category label="Tags">guitar</media:category>
<media:credit>guitar90</media:credit>
<enclosure url="http://youtube.com/v/QjA5faZF1A8.swf" duration="320" type="application/x-shockwave-flash"/>
</item>


Last blog : A new Wordpress theme for our blog
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #10 on: Apr 19, 2007, 12:30:13 am »

... ity looks like that several nodes are not recognized by MagPie the last "enclosure" is not included in the parsed array Sad

so I need to write my own parser?


Last blog : A new Wordpress theme for our blog
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #11 on: Apr 19, 2007, 12:03:10 pm »

In that case I guess you'll have to create your own....

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #12 on: Apr 19, 2007, 12:06:35 pm »

In that case I guess you'll have to create your own....

nope Smiley

I found this one:
http://waxjelly.wordpress.com/2007/03/08/youtube-api-class-redeaux/

great now I can modify/improve the first time a class in PHP5 (the link above supports only the tag request)


Last blog : A new Wordpress theme for our blog
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #13 on: Apr 19, 2007, 12:12:16 pm »

Good Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6401
Tags : youtube rss parser database Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: parsing youtube uRSS
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 07:43:59 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.