Perhaps somebody can point me in the right direction here as I'm failing to achieve what I want.
On Radio 4 is a new series by Hal Cruttenden called simply Hal. But if I say get_iplayer --type=radio "Hal" I end up with several Asian programmes along with Hancock's Half Hour and so on. Also listed though is Hal - Career, BBC Radio 4 so my question is, how can I differentiate between those unwanted programmes and the one sole programme I do want?
My first thought was that I could simply put a space in the name but then I don't get Hal Cruttenden, just the Asian programmes. I then tried to add stuff like "--fields comedy" but that didn't find anything so I'm stuck!
I assume other people have overcome similar problems so how did they solve it?
Any help appreciated.
I always use get_iplayer with the URL to the video, so this works for me...
get_iplayer-2.91 --type radio http://www.bbc.co.uk/programmes/b04p5vl1
James.
On Fri, 18 Mar 2016 17:05:25 +0000 James Bensley jwbensley@gmail.com wrote:
I always use get_iplayer with the URL to the video, so this works for me...
get_iplayer-2.91 --type radio http://www.bbc.co.uk/programmes/b04p5vl1
That would do it but it means manually checking the URL whereas I run a script like this :- for id in $(get_iplayer --type=radio "David Rodigan" "Hal" | grep -o '^[0-9]*:' | sed 's/://'); do get_iplayer --type=radio --get $id --thumbnail --mp3 done
Which means that I need to grab only the file(s) I want and nothing extra.
On 18/03/16 18:57, Chris Walker wrote:
On Fri, 18 Mar 2016 17:05:25 +0000 James Bensley jwbensley@gmail.com wrote:
I always use get_iplayer with the URL to the video, so this works for me...
get_iplayer-2.91 --type radio http://www.bbc.co.uk/programmes/b04p5vl1
That would do it but it means manually checking the URL whereas I run a script like this :- for id in $(get_iplayer --type=radio "David Rodigan" "Hal" | grep -o '^[0-9]*:' | sed 's/://'); do get_iplayer --type=radio --get $id --thumbnail --mp3 done
Which means that I need to grab only the file(s) I want and nothing extra.
I'm wondering, did you have to google to get that script, because, if you did, isn't that as simple as googling to get the url of the program?
Personally, I go to the iplayer webpage, and I find the program that I want to listen to or watch. I then use get_iplayer --get --type tv|radio "http:\THE_URL..." or get_iplayer --get --type tv|radio --pid THE_PID
Obviously I put tv or radio not tv|radio. The pid is the last bit of the url after the ? If specifying the URL, it's best to put it in "" just in case any special characters do funny things to Bash's interpretation of the command line.
There are several web pages that list how to use it. I cant find my usual "go to" page however, there's help straight from the horses mouth here: https://github.com/get-iplayer/get_iplayer/wiki
and a hugely comprehensive guide here: https://squarepenguin.co.uk/guides/
particularly pages: https://squarepenguin.co.uk/wiki/documentation/ and https://squarepenguin.co.uk/guides/tv-download-guide/
and of course there's the man page. You can limit your search by specifying the channel for instance.
Hope that helps.
Steve
On Fri, 18 Mar 2016 20:21:11 +0000 steve-ALUG@hst.me.uk wrote:
On 18/03/16 18:57, Chris Walker wrote:
On Fri, 18 Mar 2016 17:05:25 +0000 James Bensley jwbensley@gmail.com wrote:
I always use get_iplayer with the URL to the video, so this works for me...
get_iplayer-2.91 --type radio http://www.bbc.co.uk/programmes/b04p5vl1
That would do it but it means manually checking the URL whereas I run a script like this :- for id in $(get_iplayer --type=radio "David Rodigan" "Hal" | grep -o '^[0-9]*:' | sed 's/://'); do get_iplayer --type=radio --get $id --thumbnail --mp3 done
Which means that I need to grab only the file(s) I want and nothing extra.
I'm wondering, did you have to google to get that script, because, if you did, isn't that as simple as googling to get the url of the program?
No. I wrote it.
It's slightly more comprehensive than the bit above suggests as it copes with both radio and tv thus :-
VERSION=1.5 set -e # set -x
if [ -z "$1" ]; then echo Usage: $0 "You must specify radio OR tv as a parameter" exit 1 fi
case $1 in radio) get_iplayer --type=radio --refresh for id in $(get_iplayer --type=radio "<file x etc>" | grep -o '^[0-9]*:' | sed 's/://'); do get_iplayer --type=radio --get $id --thumbnail --mp3 done ;; tv) get_iplayer --refresh for id in $(get_iplayer "<file x etc>" | grep -o '^[0-9]*:' | sed 's/://'); do get_iplayer --get $id --thumbnail done ;; esac
Each week I will wade through the Radio Times and find any programmes I might want to watch or listen to and which are not captured already on either of my Humax boxes and add them to the list. I run the script every day with either tv or radio as a parameter.
Personally, I go to the iplayer webpage, and I find the program that I want to listen to or watch.
I only do that if I can't find the programme I want by any other means, usually the Radio Times - the printed version, not the web site.
There are several web pages that list how to use it. I cant find my usual "go to" page however, there's help straight from the horses mouth here: https://github.com/get-iplayer/get_iplayer/wiki
I've been looking at that one and did so before I wrote in but I can't find a way to do what I want - yet!
and a hugely comprehensive guide here: https://squarepenguin.co.uk/guides/
That was offline for a little while. I'm glad to see that it's back.
particularly pages: https://squarepenguin.co.uk/wiki/documentation/ and https://squarepenguin.co.uk/guides/tv-download-guide/
and of course there's the man page. You can limit your search by specifying the channel for instance.
Hope that helps.
It's certainly given me some more things to think about ;-)
Chris Walker wrote:
On Radio 4 is a new series by Hal Cruttenden called simply Hal. But if I say get_iplayer --type=radio "Hal" I end up with several Asian programmes along with Hancock's Half Hour and so on. Also listed though is Hal - Career, BBC Radio 4 so my question is, how can I differentiate between those unwanted programmes and the one sole programme I do want?
get_iplayer takes a REGEX, so you can add the symbols to match start and end of string and say: get_iplayer --type=radio '^Hal$'
Hope that helps,
On Wed, 23 Mar 2016 10:45:48 +0000 MJ Ray mjr@phonecoop.coop wrote:
Chris Walker wrote:
On Radio 4 is a new series by Hal Cruttenden called simply Hal. But if I say get_iplayer --type=radio "Hal" I end up with several Asian programmes along with Hancock's Half Hour and so on. Also listed though is Hal - Career, BBC Radio 4 so my question is, how can I differentiate between those unwanted programmes and the one sole programme I do want?
get_iplayer takes a REGEX, so you can add the symbols to match start and end of string and say: get_iplayer --type=radio '^Hal$'
Hope that helps,
I had managed, eventually to arrive at a similar solution.
My attempts at making it work were foiled by my own ineptitude! It was only when one of my sons pointed out my error that it began to work.
In my code I had put "'\bHal\b'" as all my other names had double quotes round them and when cutting and pasting from a web page, I had included their single quotes as well. When I removed those, it all worked.
Thanks for responding.