2015-06-06 33 views
0

我想學習如何在http://perlmaven.com/fetching-data-from-youtube-using-perl以下教程使用WebService::GData::YouTube使用的WebService ::獲得的GData YouTube用戶的個人資料:: YouTube的失敗

use strict; 
use warnings; 

use WebService::GData::YouTube; 
my $yt = WebService::GData::YouTube->new(); 
my $p = $yt->get_user_profile('Gabor Szabo'); 
print "ok\n"; 

但這種失敗,輸出:

WebService::GData::Error=HASH(0x1c45dc8) 

發生異常$yt->get_user_profile() ..

回答

1

WebService::GData::YouTube使用YouTube API v2,現在已被棄用。您需要使用可與API v3配合使用的庫。

+0

好吧,我會採取你的話,因爲錯誤消息沒有提供有關這種情況的線索:)你知道任何替代'WebService :: GData'嗎? –

+0

圖書館正在訪問v2的詳細信息可以在這裏看到:https://metacpan.org/pod/WebService::GData::YouTube#NAME – theduck

+0

我不知道這個新的Perl庫,我很害怕。這裏有大多數其他語言的客戶端庫:https://developers.google.com/youtube/v3/libraries。對不起,我不能在Perl方面獲得更多幫助。 – theduck

相關問題