[mythtv-users] Re: parsing websites for mythstream
Robin Gilks
g8ecj at gilks.org
Mon Sep 12 10:42:19 UTC 2005
[snip]
> I hope that you will be able to point me in the right direction. I'm new
> to
> linux but I've successfully "learned" my way through some fairly complex
> applications. I've installed MythTV and MythStream and my wife, who is
> from
> Germany, would like me to set up some of her hometown radio stations in
> the
> MythStream menu.
>
> The problem is that these radio stations run through an embedded player in
> Firefox. I can't figure out how to harvest the right URL to play through
> mplayer. One example is www.swr3.de. I click on the "SWR3 LIVE
> Einschalten" link in the upper right and select the RealAudio stream link
> and then the browser pulls up a window with and embedded player and start
> to
> play. I've looked at the source code but when I try to play any of the
> URLs
> with mplayer (or a standalone RealPlayer), I don't get anything.
>
> My question is: Is there a way to harvest the information from internet
> radio sites that use embedded players so that I can play them in
> MythStream?
> If yes, can you point me in the right direction?
>
> Thanks,
> Tyler
>
OK - I've had another few minutes playing and this is what I found for
this particular site - its a bit of poking about, saving pages and looking
at the overall structure looking for javascript stuff.
Called up the embedded player and (in Firefox this is) right clicked and
did a save page. This creates a file (webradio.php) and a directory of the
files associated with it. Looking in the webradio_files directory I find a
file called swr3player (this looks interesting but it looks like its
calling other functions somewhere) and a directory called swr3player_data
and in that a file called webplayer.js. This is where all the action is
and a quick look through it shows a few functions that decide how to play
(embedded RA, WME, external etc) and they get a parameter passed across
that has the channel number 01 to 10. I then selected one of the url
strings and used wget to fetch the contents - note the quotes and the fact
what I've replaced '+Eingang' with the channel number 01!!
wget
'http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?stream=swr3/channel01.rm&content=live&media=rm'
-O xxx
The contents of the file xxx is the URL for mythstream, in this case
rtsp://195.52.221.172/farm/*/encoder/swr3/channel01.rm
I hope that gives an idea of the logic of these embedded things - its a
bit luck finding the right page to save to disk so you can see if there is
anything obvious in it - all the ,gif, .jpg files can be ignored, a real
bonus if it sticks out as in this case as a .js filename :-))
--
Robin Gilks zl3rob/g8ecj
Internet: g8ecj at gilks.org http://www.gilks.org
More information about the mythtv-users
mailing list