These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

--purl option rather than using --pid ?

user-715

Hi,

How about adding a --purl option, where you could just copy and paste the whole URL for an episode in, and it would extract it for you? [I would suggest --url, but it's taken]

Rationale: You could just copy and paste the URL without having to edit the prog ID out of it

Example usage: get_iplayer --purl=http://www.bbc.co.uk/iplayer/episode/b045ghfb/world-war-i-at-home-the-zeppelin-terror
as opposed to having to edit that down and use:
get_iplayer --pid=b045ghfb

user-2

That's what
Code:
--url
is for

user-715

Ahh. I never twigged that because the help is non-obvious...

--url "<url>" Record the embedded media player in the specified URL. Use with --type=<type>.

So, how do you know what type it is? Hence why a --purl option might be easier...

user-30

As explained in the Options Wiki page Search Options section
Code:
--type
can be one of the following
Code:
livetv,tv,liveradio,radio,all
. As it states, tv is default.

So, look at the embedded media on the page at the particular URL you want. Determine if it is one of those options (it's pretty obvious) and use that type. In practice, live streams are broken so all you need to know is if it is radio as the default will already download TV automatically, which is helpfully made very obvious on the page.

Code:
--url
literally does exactly what you want. The only thing you need to know is if the programme is a radio show, in which case you'd use
Code:
--type=radio
in the command to download it.

user-2

As for
Code:
--type
, you could do worse than read the documentation. But, I think it will be obvious to you whether to use
Code:
--type=tv
or
Code:
--type=radio
. TV is the one with pictures :}
Code:
--type=tv
is the default, so not required for video. If the URL you use doesn't have an embedded media player for the particular programme episode, you're wasting your time since there is obviously nothing to record, so the help text is telling you like it is. Sorry, but no
Code:
--purl
option - it would be completely redundant.

user-715

I get it now. Cheers :)

And yes maybe I should have read the whole documentation rather than just Googling for forum posts which only mentioned - - pid and not the - - url option ... Sorry :)

These forums are archived

See this post for further info