Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- From: "s. keeling" <keeling@xxxxxxxxxxx>
- Date: Wed, 25 Jul 2007 18:14:30 GMT
Mike <Not@xxxxxxxxxxx>:
Responding to Peter Kai Jensen...
Mike wrote:
I need to find/create a script that can, when fed a typical URL to a
something.ram file, the sort you find all over the BBC's "Listen
again" pages, will extract the URL within it, the real something.ra
file address, and output that so I can then feed it to mplayer for
streaming or grabbing/converting to .wav format.
It is probably trivial for a knowledgeable scripter, but I think you're
likely to get better results if you posted an example of what link you
Ok, here's the process.
Example. On this page...
http://www.bbc.co.uk/radio4/memory/programmes/me_and_my_memory1.shtml
...we find this link to 'listen again'.
http://www.bbc.co.uk/radio4/memory/rams/meandmymemory1.ram
This text file contains this information...
rtsp://rmv8.bbc.net.uk/radio4/memory/sharpen_and_meandmy_memory_20060726.ra?start=27:30&BBC-UID=24761ae793c29631bb5dd984e0e0ebbaf84c6aaf3030b164c4ef16cff2746cab&SSO2-UID=
...which provides this file address when we trim the splurge off.
rtsp://rmv8.bbc.net.uk/radio4/memory/sharpen_and_meandmy_memory_20060726.ra
'Sounds like a job for sed:
s/^[^?]*/$url/ # grab everything at start of line short of "?"
or something. My sed is *very* rusty. You'd get better results
asking this question in comp.unix.shell.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
.
- Follow-Ups:
- Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- From: Chris F.A. Johnson
- Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- References:
- Script/Command to extract XYZ.ra URL from XYZ.ram files
- From: Mike
- Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- From: Peter Kai Jensen
- Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- From: Mike
- Script/Command to extract XYZ.ra URL from XYZ.ram files
- Prev by Date: Re: redirect users to specific webpage.
- Next by Date: Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- Previous by thread: Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- Next by thread: Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
- Index(es):
Relevant Pages
|