From thamizharasang@sulekha.net on 2013-11-21 11:25:27
:
Hi,
I need to download a file from google drive. I try but its thorough "Attribute (scope) is required at Google_Drive.pl line 4 " Error.
Here is my code. Let me know how to solve this problem.
Google_Drive.pl:
use strict;
use Net::GoogleDrive;
my $gdrive = Net::GoogleDrive->new();
my $AccessKey='AIzaSyDSxB5bnXyn3TOPB9v8ja-lIcaKiJ6ByBw';
my $code=$AccessKey;
$gdrive->token($code);
my $files = $gdrive->files();
foreach my $f (@{ $files->{items} }) {
if ($f->{downloadUrl}) {
open(my $fh, ">", "file.dl") or die("file.dl: $!\n");
print($fh $gdrive->downloadUrl($f));
close($fh);
}
}
Regards,
Thamizharasan G.
[file:///C:/Users/ThamizharasanG/Desktop/Untitled.png]
[http://classifieds.sulekha.com/marketing/outlook/week3.jpg]<http://property.sulekha.com/?utm_source=outlook&utm_medium=banner&utm_campaign=ipadimage>
(c) 2012 Copyright Sulekha.com | Privacy Policy<http://www.sulekha.com/collateral/privacy.aspx?utm_source=outlook&utm_content=footer> | Terms of Service<http://www.sulekha.com/collateral/privacy.aspx?utm_source=outlook&utm_content=footer> | All Rights Reserved. [http://classifieds.sulekha.com/marketing/outlook/ftgi.jpg]
Migrated from rt.cpan.org#90588 (status was 'new')
Requestors:
Attachments:
From thamizharasang@sulekha.net on 2013-11-21 11:25:27 :