[mythtv-users] The Daily Show with mythnetvision

Doug Vaughan r.d.vaughan at rogers.com
Thu Jun 10 00:52:26 UTC 2010

    If a source does not have an API then the next best thing is a RSS 
feed. As you mentioned just using the RSS feed will sometimes only allow 
you to access the Web page. If you want to get full browser screen plus 
auto play then that takes additional work.
    First check the Terms Of Service (TOS) as what I will mention next 
may be illegal for some sources. Anything I mention next assumes that 
you are meeting TOS and have some programming experience. Make sure you 
read the grabber standards for the XML a grabber needs to produce. 
Here are the steps I take to get to the goal of "Full browser screen and 
auto play" in MythBrowser. If you can also get download links to the 
video then that is gravy. You need to reverse engineer how the web site 
creates their video window. Usually the video is using a Flash player.

1) View the source of the Web page in a browser.
2) Look for the <embed> tag. This can give you the html information so 
you can create a local HTML file to use as the link that MythBrowser 
executes. In MythTV trunk version of MythNetvision see the 
"mythtv/internetcontent/nv_python_libs/configs/HTML" directory for some 
examples. The grabber link would be for example 
Some sites make it easy as they actually provide the embed html code for 
3) You now need to look at the RSS data and see what the "videocode" 
needs to be for each video item in the RSS feed. Sometimes that is 
straight forward but most of the times you will need to do a multi step 
a) Read the RSS data.
b) Read the associated HTML page for an item as provided in the RSS data.
c) Find the "videocode" in the HTML page so you can create the link 
"file://....." as described above. When I write videocode I really mean 
the unique code used to identify a video. From the bbciplayer example 
above that would be "b00s5nfv" for one video on the BBC iPlayer site.
4) Test the link that your grabber will make in MythBrowser BEFORE 
developing the grabber. Firefox will play links that MythBrowser will 
not play.

It often takes a while before you can find the most efficient method of 
achieving the goals as stated above.

I have found that the best ways to parse XML and HTML at least with 
python is using the lxml libraries. These libraries support XPath 
expressions and XSLT style sheets. There are a growing number of 
grabbers that are implemented with the aforementioned technologies in 
MythTV trunk. See the MythNetvision wiki grabber table for grabbers 
marked for MythTV 0.24.

If you know python or want to learn it feel free to reuse the library 
functions found in "mythtv/internetcontent/nv_python_libs" directories.

Good luck.


More information about the mythtv-users mailing list