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

feat(soundcloud): Use external executable

parent 4601d404
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -102,14 +102,18 @@ sub get {
shift;
my $id = shift;
my $response;
$log->info("the id is ".$id);
my $content = `./soundcloud $id`;
my ($external_id, $url, $title, $author, $duration) = split(/\n/, $content);
=cut
my $ua = LWP::UserAgent->new(
timeout => 30,
env_proxy => 1,
);
my $response;
$log->info("the id is ".$id);
if (looks_like_number($id))
{
$response = $ua->get(
......@@ -141,6 +145,16 @@ sub get {
if ($content->{'downloadable'}) {
$infos->{'ddl'} = $content->{'download_url'};
}
=cut
my $infos = {
author => $author,
external_id => $external_id,
duration => $duration,
site => 'soundcloud',
title => $title,
url => $url,
};
return %$infos;
}
......
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