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

查看:141
本文介绍了如何从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

我能够获取视频的缩略图,但不能获取源或URL本身.

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天全站免登陆