git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b7cfa0
)
videosite-dl: Add a connector callback which uses the http_proxy and https_proxy...
author
Ralf Ertzinger
<ralf@skytale.net>
Sat, 3 Sep 2011 22:02:03 +0000
(
00:02
+0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Sat, 3 Sep 2011 22:02:03 +0000
(
00:02
+0200)
videosite-dl.pl
patch
|
blob
|
history
diff --git
a/videosite-dl.pl
b/videosite-dl.pl
index
15e1bca
..
257da2d
100755
(executable)
--- a/
videosite-dl.pl
+++ b/
videosite-dl.pl
@@
-48,6
+48,21
@@
sub ploader {
return @g;
}
+sub connectors {
+ my $c = {-name => 'environment', -schemas => {}};
+
+ if (exists($ENV{'http_proxy'})) {
+ $c->{-schemas}->{'http'} = $ENV{'http_proxy'}
+ }
+
+ if (exists($ENV{'https_proxy'})) {
+ $c->{-schemas}->{'https'} = $ENV{'https_proxy'}
+ }
+
+ return ( $c );
+}
+
+
my $hq = 0;
my $ext = '.flv';
my $y;
@@
-78,6
+93,7
@@
foreach (@g, $f) {
if ($debug) {
$_->setdebug(1);
+ $_->setconn(\&connectors);
}
}