如何从 Instagram 公共访问 API 获取视频? [英] How to get video from Instagram public access API?

查看:39
本文介绍了如何从 Instagram 公共访问 API 获取视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个 api 正在努力获取图像,但视频呢?
https://www.instagram.com/username/?__a=1

I know that this api is working to get images but how about videos?
https://www.instagram.com/username/?__a=1

我能够获得视频的缩略图,但无法获得来源或网址本身.

I was able to get the thumbnail of the video but not the source or the url itself.

推荐答案

当您进行上述 API 调用时,它会在其中返回 code.看起来像这样:BWhyIhRDBCw

When you make above API call it would return code in it. looks something like this: BWhyIhRDBCw

只要您的媒体节点具有 "is_video": true,您就可以进行以下调用:

Whenever your media nodes has "is_video": true you can make following call:

https://www.instagram.com/p/{code}/?__a=1

例如,https://www.instagram.com/p/BWhyIhRDBCw/?__a=1

这将返回另一个 json.其中将包含您正在寻找的 video_url.

This would return another json. which will have video_url you are looking for.

示例:

"video_url": "https://scontent-bom1-1.cdninstagram.com/vp/437699b67172f450331fa732f0777b18/5A7FE0A0/t50.2886-16/20138822_486349355081174_1539674401849475072_n.mp4",

这篇关于如何从 Instagram 公共访问 API 获取视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆