Skip to content
Extraits de code Groupes Projets
Valider 3dff32bd rédigé par Alexandre Morignot's avatar Alexandre Morignot
Parcourir les fichiers

use proxy env configuration

parent 5e652e40
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -9,7 +9,10 @@ sub get {
$url =~ s/www/api/;
my %infos;
my $ua = LWP::UserAgent->new(timeout => 30);
my $ua = LWP::UserAgent->new(
timeout => 30,
env_proxy => 1,
);
my $response = $ua->get($url);
die($response->status_line) unless ($response->is_success);
......
......@@ -18,7 +18,10 @@ BEGIN {
sub get {
my $id = shift;
my $ua = LWP::UserAgent->new(timeout => 30);
my $ua = LWP::UserAgent->new(
timeout => 30,
env_proxy => 1,
);
my $response = $ua->get($endpoint
.'/videos?id='.$id
.'&key='.$conf->{'youtube_api_key'}
......
......@@ -14,7 +14,8 @@ sub get {
my $ua = LWP::UserAgent->new(
agent => "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 GTB7.1",
timeout => 30
timeout => 30,
env_proxy => 1,
);
my $response = $ua->get($url);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter