YouTube
Gowa Ryu's channel
<% ' change the RSSURL variable to the exact URL of the RSS Feed you want to pull '' RSSURL = "http://gdata.youtube.com/feeds/base/users/gowaryu/uploads?" RSSURL="http://www.youtube.com/rss/tag/gowaryu.rss" dim iPageStart dim iPageSize ipagesize= 10 ipagestart = request("from") if len(ipagestart)=0 then ipagestart=0 if ipagestart < 0 then ipagestart=0 Dim objHTTP ' this object is used to call the RSS Feed remotely Dim RSSURL,RSSFeed ' these variables hold the URL and Content for the RSS Feed Dim xmlRSSFeed ' this variable hold the XML data in a DOM Object Dim objItems,objItem, objChild ' these variables are used to temporarily hold data from the various RSS Items Dim title,description,link, sDate ' these are local variables that will hold the data to be displayed Dim OutputHTML_1,OutputHTML_2,OutputHTML_3 ' these variables will hold the HTML that was converted from the RSS Feed dim arrDate ' this code requests the raw RSS/XML and saves the response as a string Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP") objHTTP.open "GET",RSSURL,false objHTTP.send dim sRSSResult sRSSResult = objHTTP.responseText ' sRSSResult = replace(sRSSResult,"<","<") ' sRSSResult = replace(sRSSResult,">",">") ' sRSSResult = replace(sRSSResult,"","") ' sRSSResult = replace(sRSSResult,"","") ' sRSSResult = replace(sRSSResult,"","") RSSFeed = sRSSResult ' this code takes the raw RSSFeed and loads it into an XML Object Set xmlRSSFeed = Server.CreateObject("MSXML2.DomDocument.4.0") xmlRSSFeed.async = false xmlRSSFeed.LoadXml(RSSFeed) ' this code disposes of the object we called the feed with Set objHTTP = Nothing ' this is where you determine how to display the content from the RSS Feed ' this code grabs all the "items" in the RSS Feed Set objItems = xmlRSSFeed.getElementsByTagName("item") ' this code disposes of the XML object that contained the entire feed Set xmlRSSFeed = Nothing dim iCounter icounter = 0 ' loop over all the items in the RSS Feed response.write("") response.write("") response.write("") response.write("") if CInt(ipagestart) > objItems.length - 1 then ipagestart = objItems.length - 1 For x = 0 to objItems.length - 1 if CInt(x) >= CInt(iPageStart) and CInt(x) <= (CInt(ipagestart) + CInt(ipagesize)) then ' this code places the content from the various RSS nodes into local variables Set objItem = objItems.item(x) For Each objChild in objItem.childNodes Select Case LCase(objChild.nodeName) Case "title" title = objChild.text Case "author" author = objChild.text Case "link" sLink = objChild.text Case "description" description = objChild.text description = replace(description,"
" sLink = replace(sLink, "/?v=","/v/") sLink = replace(sLink,"www.youtube.com","youtube.com") sPlayer = vbcrlf & vbcrlf & " " & vbcrlf & vbcrlf if author="rss@youtube.com (gowaryu)" then OutputHTML_1 = OutputHTML_1 & "" end if end if ' OutputHTML_2 = OutputHTML_2 & "" & title & "
" ' OutputHTML_3 = OutputHTML_3 & "" & title & "
" Next response.write(OutputHTML_1) response.write("") response.write("") response.write("") response.write("") %>
<< NewerOlder >>
" & title & "
" & sDate & "
" & description & "
" & title & "
" & sDate & "
" & sPlayer & "
<< NewerOlder >>