如何获取 YT 视频位置?

How to get YT video location?

我尝试通过 YT 获取给定视频的位置 API

我在 API 概览中看到它,但在 JSON 概览中没有看到:

但是:

那我怎样才能得到它?

根据官方 API Revision History 文档,API 已经有一段时间没有提供您感兴趣的信息了:

June 1, 2017

This update contains the following changes:

Note: This is a deprecation announcement.

The following video resource properties are being deprecated. While the properties will be supported until December 1, 2017, there is no guarantee that videos will continue to return values for those properties until that time. Similarly, videos.insert and videos.update requests that set those property values will not generate errors before that date, but it is possible that the incoming data will not be stored.

根据我的经验,仍然有视频在调用 Videos.list API 端点时返回了该信息,但没有官方解释。

例如,ID 为 7huCin676dA 的仍然附加了 recordingDetails

$ wget -qO- --content-on-error \
"https://www.googleapis.com/youtube/v3/videos?key=$YOUTUBE_DATA_APP_KEY&id=7huCin676dA&part=recordingDetails&fields=items/recordingDetails&maxResults=1"
{
  "items": [
    {
      "recordingDetails": {
        "locationDescription": "Tremola Passstrasse",
        "location": {
          "latitude": 46.545149,
          "longitude": 8.5694851,
          "altitude": 0
        }
      }
    }
  ]
}