我如何从 TMDB 中找到电影的评级

How can I find a movie's rating from TMDB in

我一直在 Perl 中使用 TMDB 来获取很多关于电影的信息,例如:

my @results = $tmdb->search->movie("Back To The Future");

我得到了很多信息,很多散列和数组,我得到了我要找的所有信息。但是无论我挖掘多深,我似乎都找不到找到 MPAA 对电影的评级的路径。

有没有人有这方面的经验?我觉得我陷入了一个永恒的循环。

您可以获得这样的认证:

use feature qw(say);
use strict;
use warnings;

use TMDB;

my $tmdb = TMDB->new(
   apikey => '?????????',  # API Key
   lang   => 'en',             # A valid ISO 639-1 (Aplha-2) language code
);

my @results = $tmdb->search->movie("Back To The Future");

for my $result (@results) {
    my $id = $result->{id};
    my $movie = $tmdb->movie( id => $id );
    my $releases = $movie->releases;
    my @cert = map { $_->{certification} } @$releases;
    say $result->{title}, " : ", join ",", @cert;
}

输出:

Back to the Future : ,,,,,,,,,,,,,,,11,11,11,12,6,6,6,6,7,A,A,K-10,L,M/6,PG,PG,PG,PG,PG,PG,PG12,T
Back to the Future Part II : ,,,,,,,,,,,,,,,,11,12,6,6,6,6,7,K-10,L,M/12,PG,PG,PG,PG,PG,T,U
Back to the Future Part III : ,,,,,,,,,,,,,,,11,12,12,12+,6,6,6,6,7,K-10,M/12,PG,PG,PG,T,U
Project 88: Back to the Future Too : 
Romesh's Look Back to the Future : 
Looking Back to the Future : NR
Back to the Future: Making the Trilogy : 
Back To The Future... The Ride : 
Back to the Future Part II. Behind the scenes. : 
The Making of Back to the Future : 
The Secrets of the Back to the Future Trilogy : 
Back to the Future: Hilarious Outtakes : PG
Looking Back to the Future: Raymond Loewy, Industrial Designer : 
Back to the Future: Greater Scott Edition : 
The Making of Back to the Future Part 2 : 
Back to the 2015 Future : 
Looking Back at the Future : 
Ivan Vasilyevich Changes His Profession : 12+