如何通过其API获取FT文章?
在要求提供密钥之后,我首先在其content API v2周围使用了a python API wrapper。所以我运行了以下命令:
from pyft import FT
ft = FT()
# the id can be pulled from the slug url of an FT.com story
content = ft.get_content("6f2ca3d6-86f5-11e4-982e-00144feabdc0")
print(content)并得到了:
{'error': 'Access to this API has been disallowed'}所以我关注了the official instructions,但得到了同样的错误:

发布于 2019-01-04 19:47:10
这应该是一个来自FT的Bug。因为,get_content_notifications没有任何问题。
notification = ft.get_content_notifications("2018-10-10T00:00:00.000Z")
print(notification)
{
"requestUrl": "https://api.ft.com/content/notifications?since=2018-10-10T00%3A00%3A00.000Z",
"notifications": [
{
"type": "http://www.ft.com/thing/ThingChangeType/UPDATE",
"id": "http://www.ft.com/thing/e75d5a6c-b725-11e8-bbc3-ccd7de085ffe",
"apiUrl": "https://api.ft.com/content/e75d5a6c-b725-11e8-bbc3-ccd7de085ffe"
}
}发布于 2019-07-04 19:11:25
这是因为您的API密钥处于Headline License下,仅允许访问有限的enpoint。因此,您应该考虑购买Datamining License,以便访问更多端点,包括代码中的"get content“。点击此处查看更多信息:https://developer.ft.com/portal/docs-start-obtain-an-api-key
发布于 2020-02-21 06:20:45
来自FT.com的说明
Postman Download FT_API_Postman_Collection.json
<>F221
在设置FTAPI环境时,请确保将变量命名为'KEY‘,因为这就是它在Postman collection.json中的名称
https://stackoverflow.com/questions/54036953
复制相似问题