My bat_iplayer script now has a problem.

Vangelis forthnet northmedia1 at the.forthnet.gr
Sun Jun 7 18:28:40 PDT 2015


On Sun Jun 7 22:21:23 BST 2015, Jon Davies wrote:

>>>> TITLE=$(wget --quiet -O - http://www.bbc.co.uk/programmes/$PID.rdf |
>>>> grep "<dc:title>" | sed -re "s/ *<dc:title>(.*?)<\/dc:title>/\1/")
>>> (snip)
>>> No doubt batguano999 would be thankful for your code...
>>> (snip)
>> Not at all, it doesn't work.
>>
> then you have a different version of bash or sed to me :-(

Hi...
As said previously in this thread, I do not have
a Linux box to check myself the posted code
(so kindly) by Jon...
However, it just dawned on me that I have an
MSYS2_MinGW-w64 compiler on my USB HDD,
that I sometimes use to compile custom FFmpeg
builds with non-free libs; this compiler uses the
mintty terminal (msys2 shell console, xterm-256color),
which is a Linux-y environment on my win32 box...

When I typed (all in one line) for PID= b05yl3kr:

wget --quiet -O - http://www.bbc.co.uk/programmes/b05yl3kr.rdf | grep 
"<dc:title>" | sed -re "s/ *<dc:title>(.*?)<\/dc:title>/\1/"

the console returned an error; but when I retyped
the command replacing the double quotes in the sed
bit with single quotes, i.e.

wget --quiet -O - http://www.bbc.co.uk/programmes/b05yl3kr.rdf | grep 
"<dc:title>" | sed -re 's/ *<dc:title>(.*?)<\/dc:title>/\1/'

the console returned:

Episode 5

which is correct...
So perhaps batguano999 could try that also...

 As have already posted, "Episode 5" is
the "subtitle", not the full title; the latter, which is
"CBBC Official Chart Show, Episode 5" can be
harvested from the JSON playlist file:
http://www.bbc.co.uk/programmes/b05yl3kr/playlist.json
that is if one can come up with the code to do that...

Cheers,
V. 




More information about the get_iplayer mailing list