Re: Script/Command to extract XYZ.ra URL from XYZ.ram files



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.
.



Relevant Pages

  • Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
    ... Mike wrote: ... the sort you find all over the BBC's "Listen ... again" pages, will extract the URL within it, the real something.ra ... no idea where to find the right kind of input file. ...
    (alt.os.linux)
  • RE: sorting by name
    ... Thanks Mike, strangely, it works on some cells and not others, wonder why ... You need a helper column to extract the last name with this formula ... having extracted the last names in the new column sort your data on this ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Script/Command to extract XYZ.ra URL from XYZ.ram files
    ... Mike wrote: ... the sort you find all over the BBC's "Listen ... again" pages, will extract the URL within it, the real something.ra ... http://www.comp.eonworks.com _Linux SysAdmin and Webmaster scripts_ ...
    (alt.os.linux)
  • Re: New BN Site
    ... > They used to list swimming sessions. ... > apologies if I am simply being a bit blind.) ... sort of interest and had so far strongly resisted putting in any sort of ... was good old Mike B. ...
    (uk.rec.naturist)
  • Re: Fast attribute/list item extraction
    ... to have a case insensitive sort leaving the original case intact: ... the idea was born to add a fast extract function maker to the operator ... for age, agegroup in groupby): ... print 'Students of age ', ...
    (comp.lang.python)