Re: My bat_iplayer script now has a problem.

2015-06-07 Thread Vangelis forthnet

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 "" | sed -re "s/ *(.*?)<\/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 
"" | sed -re "s/ *(.*?)<\/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 
"" | sed -re 's/ *(.*?)<\/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. 



___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: partialproxy - tv only?

2015-06-07 Thread Vangelis forthnet
On Sun Jun 7 15:42:26 BST 2015, Arthur Murray wrote: 


Yes, unfortunately this requires a lot of manual intervention.


Hi - the way the --proxy option is applied to GiP 
cannot meet your needs... 
--proxy is oblivious to the prog type about to be fetched... 
If what you ask for were to be realised, a new option/switch 
would have to be created (e.g. --proxytv), either a standalone 
one or one used in conjuction with --proxy, that would specifically 
proxy URL requests for --type=tv. This is, in theory, feasible, 
but a rewrite of the script in several places would be needed - 
if you know perl or can find someone who does and is willing, 
then... but do not expect this to be done officially...


If using the PVR (and it finds new TV and RADIO items) 
it would appear to require manual editing all of the /pvr files 
to handle TV and RADIO differently.


I am not using either the PVR nor the GUI (WPM). I am 
performing ad-hoc downloads via the CLI, 95% of which 
are audio (radio files/audio clips). 
How are you setting/using the PVR - via CLI or WPM? 
If via WPM, one way that you can semi-accomplish what you want is if 
you use the WPM and add Searches manually: 
1. Perform your radio searches in WPM - then manually add the 
results to persistent/one-off PVR searches (via "Add Search to"/
"Add Series"/"Queue"), 
seeing that the "Web proxy URL" input field is empty. 
Under PVR list you are able to see that your 
radio PVR searches will be executed direct (no proxy used).
2. After you've finished with radio, perform your 
TV searches in WPM; after the results are found, 
set the proxy value inside the "Web proxy URL" input field 
and hit "Apply Settings" - then add your TV searches to 
persistent/one-off PVR searches. 
Under your PVR List tab you can now see your 
unproxied Radio searches & your proxied TV ones.
Then it's a matter of just clicking "Run PVR" - 
no need to edit manually PVR files...
--partial-proxy is not supported by the WPM, 
so it should be added in options via CLI.
WPM will overwrite the --proxy option, 
if set permanently in your user options (see 
https://github.com/get-iplayer/get_iplayer/wiki/webpvr#relationship-to-cli)



(is it better to have a partialproxy/proxy in options,
and add noproxy to the radio items?


If you are to keep doing this manually, then it 
depends on the number of Radio vs TV PVR 
searches; if radio is far more, then it'd be more 
practical to edit fewer TV searches by adding 
the proxy/partialproxy lines to them and not have them 
in your options file permanently. 
If, on the other hand, TV are more, set 
proxy/partialproxy lines in your options, then 
edit the fewer Radio searches with the noproxy line...



OR no proxy in options and
partialproxy all the tv pvr files?


The way I read the longhelp of 2.94, 
--no-proxy is not to be saved permanently 
in your user options - it's just a way to temporarily 
override (e.g. in the CLI or a saved search) 
the --proxy option, in case it already exists in 
your user options...
There is no reason, obviously, to save both 
options permanently (or use them together in a 
command), since they cancel each other...
If, as you say, --no-proxy is saved permanently 
and you edit a TV PVR search to include 
--proxy, I'm afraid that when that PVR search 
is run, it'll pick the --no-proxy switch from your 
options and negate the --proxy option set within 
the PVR search...
(if you're using the CLI to add PVR searches, 
then there's still a way to accomplish what you 
want - I do not want to repeat myself, so 
consult the documentation: 
https://github.com/get-iplayer/get_iplayer/wiki/documentation#pvr-usage ;
add the -p /--no-proxy option where necessary 
inside the "Add the PVR search" command...).


Said enough already (and may have crossed 
some red lines, too...).


Regards.


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: My bat_iplayer script now has a problem.

2015-06-07 Thread Jon Davies
On 6 June 2015 at 16:43, batguano999  wrote:
>
>  On Fri, 05 Jun 2015 00:43:13 + Vangelis 
> forthnet wrote 
>  > On Thu Jun 4 09:47:34 BST 2015, Jon Davies wrote:
>  >
>  > > this should work:
>  > >
>  > > TITLE=$(wget --quiet -O - http://www.bbc.co.uk/programmes/$PID.rdf |
>  > > grep "" | sed -re "s/ 
> *(.*?)<\/dc:title>/\1/")
>  >
>  >  Hi, Jon!
>  >
>  >  No doubt batguano999 would be thankful for your code...
>  >
>
> Not at all, it doesn't work.

then you have a different version of bash or sed to me :-(

Jon

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: GiP v2.93 / 2.94- snafus

2015-06-07 Thread Peter S Kirk
On 7 Jun 2015 at 4:24, Vangelis forthnet Vangelis forthnet 
 wrote:

> On Thu Jun 4 21:40:56 BST 2015, M Clark wrote:
> 
> >> cookies set by "127.0.0.1"
> > 
> > my address bar has http://localhost:1935/
> > I just wish I could remember to back-up Firefox cookies 
> > for when I accidently delete them.
> 
>  I simply use Piriform's CCleaner (freeware) to manage browser 
> cookies; supports IE, Firefox, Google Chrome, Opera. 
> You can set the cookies you don't want deleted 
> (e.g. cookies by "localhost" or ones set by other sites that 
> require you to log in) as exceptions and then CCleaner 
> will remove all cookies from all browsers but the ones you 
> specified in the exceptions list! It's very handy!
> Just a tip I use...

Plus 1 for that. I've been doing the same for years with auto-run at 
startup selected. Installed same set-up on mother's PC too.

Cheers, Peter

-

Web Hosting and VPS provided by HostSlim
https://clients.hostslim.eu/aff.php?aff=079




___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: partialproxy - tv only?

2015-06-07 Thread Arthur Murray
On Sun, Jun 7, 2015 at 7:07 AM, Vangelis forthnet
 wrote:
> On Sat Jun 6 19:09:16 BST 2015, Arthur Murray wrote:
>>
>> Is there a way to use a proxy only for TV and not for Radio?
>> partialproxy still uses a proxy for radio or podcasts


> If you have the -p & --partial-proxy stored in your user options, then you
> can download radio & podcasts directly, if you so wish, using the CLI and
> adding the new switch
> --no-proxy Ignore --proxy setting in preferences
>
> Alternatively, you can remove -p & --partial-proxy from your options,
> download radio & podcasts normally via CLI/GUI and when you want to fetch
> TV, specify -p & --partial-proxy in the CLI (the GUI does have proxy support
> under the "Recording" tab settings, however the --partial-proxy switch can't
> be set there...)

Yes, unfortunately this requires a lot of manual intervention.

If using the PVR (and it finds new TV and RADIO items) it would appear
to require manual editing all of the /pvr files to handle TV and RADIO
differently.  (is it better to have a partialproxy/proxy in options,
and add noproxy to the radio items? OR no proxy in options and
partialproxy all the tv pvr files?)  Would then need to manually edit
the pvr files whenever adding new programmes to the pvr.

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: partialproxy - tv only?

2015-06-07 Thread Vangelis forthnet
On Sat Jun 6 19:09:16 BST 2015, Arthur Murray wrote: 

Is there a way to use a proxy 
only for TV and not for Radio?

partialproxy still uses a proxy for radio or podcasts


Hello...
It is unclear under which environment you are forced to 
use the --proxy option; this is a global option that 
forces GiP to use the specified proxy for all HTTP 
traffic; be informed that rtmpdump lacks HTTP proxy 
support (only Socks4 proxy is supported), so in any flash 
modes (TV/radio) rtmpdump will be trying 
to establish connection with Flash Media Servers (FMS) 
directly from your original (non-proxied) IP address - 
the result of these attempts depends upon individual 
FMS configuration...

From 2.94's long help:


--proxy, -p  
Web proxy URL e.g. 'http://USERNAME:PASSWORD@SERVER:PORT' 
or 'http://SERVER:PORT'. Sets http_proxy environment variable 
for child processes (e.g., ffmpeg) unless --partial-proxy is specified.


This means with --proxy set, hls modes are downloaded (by ffmpeg) 
through the specified proxy.


--partial-proxy  (requires --proxy)
Only uses web proxy where absolutely required 
(try this extra option if your proxy fails). 
If specified, value of http_proxy environment variable (if any) 
in parent process is retained and passed to child processes.


--partial-proxy thus limits the proxied HTTP traffic to only 
those URLs that are absolutely essential for stream data 
acquisition...hls modes are downloaded (if/when possible) 
with ffmpeg performing a direct connection (non-proxied) 
to AppleHLS CDN servers...


If you have the -p & --partial-proxy stored in your user 
options, then you can download radio & podcasts directly, 
if you so wish, using the CLI and adding the new switch 

--no-proxy 
Ignore --proxy setting in preferences


Alternatively, you can remove -p & --partial-proxy 
from your options, download radio & podcasts 
normally via CLI/GUI and when you want to fetch TV, 
specify -p & --partial-proxy in the CLI (the GUI does 
have proxy support under the "Recording" tab settings, 
however the --partial-proxy switch can't be set there...)


DISCLAIMER: It is not the fault of GiP, i.e. GiP code 
authors/maintainers are not to be blamed if a user 
- after his/hers very own decision - tries to use the code 
in a non-endorsed/acceptable manner...
I believe HTTP support was included to deal with 
controlled environments in the UK (work, school, 
academic institutions) in which Internet access is 
granted via the use of a corporate proxy...


Regards 


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer