问题描述
直到最近,有几种无需API身份验证即可检索Instagram用户媒体的方法.但是显然,该网站阻止了所有这些攻击.
Until recently there were several ways to retrieve Instagram user media without the need for API authentication. But apparently, the website stopped all of them.
某些旧方法:
https://www.instagram.com/user-id/media
https://www.instagram.com/user-id/?__ a = 1
一些与旧相关的问题是:
我能够通过抓取的网页来检索前二十个项目,但这不是一个好的方法或标准方法,尤其是在Instagram不正式支持它的情况下.
I was able to retrieve the first twenty items by crawling the webpage of the user, but this is not a good or standard method especially when Instagram is not supporting it officially.
我想知道您是否知道当前有效的任何方法?
I was wondering If you know any method that currently works?
推荐答案
不幸的是,Instagram停止了许多API,包括私有API.它在 https://www.instagram.com/developer/中声明:
Unfortunately, Instagram stopped many of its APIs, including the private ones. It states in https://www.instagram.com/developer/:
一些链接说明了这些更改的详细信息和原因:
Some links explaining the details and causes of these changes:
https://techcrunch.com/2018/04/02/instagram-api-limit/
https://www.macrumors.com/2018/04/04/instagram-disables-third-party-app-apis/
(@ Louis B.建议)提出了一些非官方的爬网方法. https://stackoverflow.com/a/49906525/278840 .您应考虑到每周都会对这些方法进行转换.因此,我绝对喜欢使用私有API.
Some unofficial crawling methods have been proposed in (suggested by @Louis B.) https://stackoverflow.com/a/49906525/278840. You should take into consideration that these methods are being transformed each week. Therefore, I definitely prefer to use the private API.
更新:
旧的公共API(无身份验证)再次正常工作.我们可以通过在个人资料网址的末尾添加?__a=1
来访问,例如此 :
The old public API (without auth) is working again. We can access by adding ?__a=1
to the end of a profile url, like this:
https://www.instagram.com/leomessi/?__a=1
这篇关于无论如何,是否有当前无需身份验证就可以获取Instagram用户媒体的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!