推特 API V2 视频 url

Twitter API V2 video url

我正在尝试使用 API V2 获取推文的视频 url。

使用API V1.1 我可以使用

https://api.twitter.com/1.1/statuses/show.json?id=<ID>&include_entities=true

并在

的响应中获取直接 mp4 urls

extended_entities.media[0].video_info.variants

但是使用 API V2 我似乎找不到任何方法来获取这些内容,我只能获取视频缩略图而不是实际视频。

我已经用 lookup and the recent search 两个端点都试过了,但找不到方法。

lookup docs 推特上说:

This endpoint was recently graduated from Twitter Developer Labs, and is the replacement of v1.1 statuses/show, v1.1 statuses/lookup, and Labs Tweet lookup. If you are currently using any of these endpoints, you can use our migration materials to start working with this new endpoint.

但情况似乎并非如此,该功能不包括在内吗?另外,如果有任何其他方法能够在网页中嵌入推特视频(没有推文文本),那将会很有帮助。

目前有 not currently available in the Twitter API v2 个视频。这是一个已知请求。

twitter-api-v2 媒体处理方面取得进展,也许这将允许视频 URL 也出现在响应中。

https://twittercommunity.com/t/v1-1-media-endpoints-available-for-essential-access-in-the-twitter-api-v2/171664