get_iplayer and Windows batch files
northmedia1 at the.forthnet.gr
Mon Jan 16 10:41:03 EST 2012
On Sun Jan 15 23:30:07 GMT 2012, Shevek wrote:
>I have a batch script set up to run daily using Windows task scheduler.
>The trick is that by default .pl files are not associated to anything
>under windows (they are, I assume, under Linux), so you have to
>actually call perl.exe and pass get_iplayer.pl as an argument and then
>the arguments for get_iplayer.
You are right; that is exactly what the "get_iplayer.cmd" file inside the
installation folder does. If opened with notepad (right click -> Edit), you
perl.exe get_iplayer.pl %*
So, in terms of a batch file context,
is the same as
>This is my script which downloads multiple programmes of both TV and
>Radio. When I want to add anything I simply add it to the list at line
>4 for TV and line 6 for Radio:
I mostly download radio. I used to be an ipdl (Paul Battley's one) user,
where one would only need to provide a programme's pid (off the iPlayer
for that programme to be downloaded...
More as a "batch file writing" exercise, I've written a .bat to download
with get_iplayer by simply providing a pid; I've named the file
and placed it inside my downloads folder ("D:\Vangelis\iPlayer
I am just running it from there...
Content of the GetRadioProgramme.bat file follows (this is for a Win 32bit
REM *** CD to get_iplayer's installation folder ***
cd /d "C:\Program Files\get_iplayer\"
REM *** Refresh Radio Cache ***
CALL get_iplayer --type=radio --refresh dontshowanymatches
echo *** Download Radio Programme via its pid ***
SET /P PID="Paste pid, then press ENTER "
get_iplayer --type=radio -i --pid=%PID% --modes=flashaac --force -w --tag-podcast-radio
One can use one's personalised flavour of the get_iplayer command, with
additional options and their arguments...
Of course, using the standard route I can just type e.g.
get_iplayer --type=radio --pid=b019dmzb
1. I may have to first wait for the TV cache to be refreshed (default
behaviour, can be changed...)
2. type everytime any additional options/arguments or, if don't want that,
add them in my personal options
with get_iplayer --prefs-add
Anyhow, already said I did it as an exercise, possibly someone finds it
More information about the get_iplayer