I’m not sure if this topic has been covered somewhere else, I did read go through about 50 pages of topics and didn’t see anything relevant at all. I hope I am posting this in the correct area, if not please forgive a newbie and kindly direct me where I should go. I will gladly move the post there..
So here is my situation. I have a streaming video web site since 1998, Currently we are streaming “by demand” video using IIS Smooth Streaming and the “24-7 live” streaming channels use HLS (.m3u8) We stream these formats on the website but mostly through Roku with over 30,000 subscribers.. (All 100% free as we have been since we were BBS/usenet hub back in 1992 through today).
Ok thats the background. So since we have most of the videos already indexed for Roku in XML files I figured there must be a “proper” hopefully easy way to parse the same files for use on the Kodi channel we want to develop. The thing is, Python is so dissimilar to brightscript (which I am a layman at but good enough to make roku work well) and classic asp that I am completely lost as to where to begin, (if it hasn’t been done already).
So here’s the sample xml files…
categories.xml contains
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<categories>
<!– banner_ad: optional element which displays an at the top level category screen –>
<banner_ad sd_img=”http://rokudev.roku.com/rokudev/examples/videoplayer/images/missing.png” hd_img=”http://rokudev.roku.com/rokudev/examples/videoplayer/images/missing.png”/>
<category title=”Professional Wrestling” description=”Sports” sd_img=”http://www.tvbydemand.com/roku/images/sports_button-sd.jpg” hd_img=”http://www.tvbydemand.com/roku/images/sports_button-hd.jpg”>
<categoryLeaf title=”Loco Wrestling” description=”” feed=”http://www.tvbydemand.com/roku/locowrestling.xml”/>
<categoryLeaf title=”UIWA WorldWide Wrestling” description=”” feed=”http://www.tvbydemand.com/roku/UIWA.xml”/>
</category>
<category title=”Music” description=”Music” sd_img=”http://www.tvbydemand.com/roku/images/music_button-sd.jpg” hd_img=”http://www.tvbydemand.com/roku/images/music_button-hd.jpg”>
<categoryLeaf title=”Aim For Grey” description=”Aim For Grey” feed=”http://www.tvbydemand.com/roku/AimForGrey.xml”/>
<categoryLeaf title=”VooDoo Moon” description=”VooDoo Moon” feed=”http://www.tvbydemand.com/roku/VooDooMoon.xml”/>
</category>
</categories>
</xml>
___________________
each category creates the index for the “categoryleaf” which is basically a subcategory of the main. Each subcategory (“categoryleaf”) has another xml file that contains the list of videos to choose from).. so
locowrestling.xml contains
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<feed>
<item sdimg=”http://www.tvbydemand.com/images/fnm.jpg” hdimg=”http://www.tvbydemand.com/images/fnm.jpg”>
<title>Friday Night Madness 06-12-2015</title>
<contentid>1</contentid>
<contenttype>Streaming video</contenttype>
<contentquality>SD</contentquality>
<streamformat>ISM</streamformat>
<media>
<streamquality>SD</streamquality>
<streambitrate>3000</streambitrate>
<streamurl>http://www.tvbydemand.com/media2/iis/fnm/2015-06-12/finished.ism/manifest</streamurl>
</media>
<synopsis>Friday Night Madness 06-12-2015The Last FNM recorded at the Light House.New Season coming in December 2015!!</synopsis>
<genres>Sports</genres>
<runtime>5418</runtime>
<rating>G</rating>
<releasedate>11/23/2015</releasedate>
<director>TVByDemand.com</director>
</item>
<item sdimg=”http://www.tvbydemand.com/images/fnm.jpg” hdimg=”http://www.tvbydemand.com/images/fnm.jpg”>
<title>Friday Night Madness 06-05-2015</title>
<contentid>2</contentid>
<contenttype>Streaming video</contenttype>
<contentquality>SD</contentquality>
<streamformat>ISM</streamformat>
<media>
<streamquality>SD</streamquality>
<streambitrate>3000</streambitrate>
<streamurl>http://www.tvbydemand.com/media2/iis/fnm/2015-05-06/finished.ism/manifest</streamurl>
</media>
<synopsis>the second to last episode of Friday Night Madness Season 3</synopsis>
<genres>Sports</genres>
<runtime>4800</runtime>
<rating>G</rating>
<releasedate>10/13/2015</releasedate>
<director>TVByDemand.com</director>
</item>
</feed>
</xml>
These xml files are created by scripts I wrote about 8 years in classic asp and played by roku in scripts I wrote in brightscript also about 8 years ago. so I’m a bit rusty even in that let alone something so different with python, but I learn very quickly when I know where to start..
Can anyone help me out at all in this? Maybe just a place to start on parsing xml or maybe his has been done already and there is sample code I can dissect and learn from.
Thanx in advance!