当我试图访问OMDbAPI (http://www.omdbapi.com/)时,会收到一个错误。此外,当我去那个网站并尝试手动查找一部电影时,我会得到一个Response failed。
我试图运行这一行:find_by_title('Arrival', year_of_release = 2016),并获得以下错误:Error in find_by_title("Arrival", year_of_release = 2016) : Unauthorized (HTTP 401).
任何帮助都是非常感谢的。
发布于 2017-05-25 08:21:52
您必须获得一个密钥并将其添加到所有请求中。
OMDb API:http://www.omdbapi.com/?i=tt3896198&apikey=key海报API:http://img.omdbapi.com/?i=tt3896198&h=600&apikey=key
这是他们网站上的东西。
We are going private!
05/10/17 - New API Keys! Due to some security concerns on how the keys were being distributed I updated the form to email them and also changed the algorithm used, which means your older keys not obtained through email will eventually stop working.
05/08/17 - Going Private! Please go read the post on the Patreon page about this major change. 你必须得到一个API密钥。
发布于 2017-06-17 15:15:44
我用了他们的API一年多了,现在停止了。如果您需要执行大量查询,那么我认为成为OMDBAPI的赞助商是个好主意。然而,我在我的小型私人项目中使用了它们的API。在搜索了一下之后,我找到了另一个API。下面是PHP中的代码,也许您可以在R中执行类似的操作:
<?php
$imdbID = 'tt2866360';
$data = json_decode(file_get_contents('http://api.rest7.com/v1/movie_info.php?imdb=' . $imdbID));
if (@$data->success !== 1)
{
die('Failed');
}
echo '<pre>';
print_r($data->movies[0]);我不附属于这个网站。但是我使用这个API,所以如果有人知道的话,我可以回答一两个问题。
https://stackoverflow.com/questions/44130398
复制相似问题