How to get video from Instagram public access API?

心不动则不痛 提交于 2020-08-18 22:02:38

问题


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.


回答1:


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

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

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

for e.g., https://www.instagram.com/p/BWhyIhRDBCw/?__a=1

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

sample:

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



回答2:


This url working in local machine but not on my remote server.

When i try to hit from remote server its returning html content.



来源:https://stackoverflow.com/questions/48701957/how-to-get-video-from-instagram-public-access-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!