刮擦Instagram媒体时的错误,通过在URL的末尾添加(?__ a = 1)
有时,在尝试刮擦Instagram媒体时,通过在URL的末尾添加(?__ a = 1)
ex: https://www.instagram.com/p/cp/cp-kws6fors/? = 1
响应返回了
{
"__ar": 1,
"error": 1357004,
"errorSummary": "Sorry, something went wrong",
"errorDescription": "Please try closing and re-opening your browser window.",
"payload": null,
"hsrp": {
"hblp": {
"consistency": {
"rev": 1005622141
}
}
},
"lid": "7104767527440109183"
}
为什么返回此响应,我该怎么办才能解决此问题?另外,我们还有另一种获取视频和照片URL的方法吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我通过将
& __ d = dis
添加到URL末尾的查询字符串来解决此问题,就像:https://www.instagram.com/p/cfr6g-whxxxp /?__ a = 1& __ d = dis
I solved this problem by adding
&__d=dis
to the query string at the end of the URL, like so:https://www.instagram.com/p/CFr6G-whXxp/?__a=1&__d=dis
我相信我可能会使用以下方法找到一个解决方法:
https://i.instagram.com/api/v1/users/web_profile_info/?username= {username}
以获取用户的信息和最近的帖子。data.user
来自响应的与graphql.user
来自https://i.instagram.com/ {username}/?__ a = 1 < /代码>。
&lt; meta property =“ al:ios:url” content =“ instagram:// media?id = {media_id}”&gt;
中提取媒体ID。 ://instagram.com/p/ {post_shortcode} 。https://i.instagram.com/api/v1/media/ {Media_id}/info
使用提取的媒体ID获得与https://instagram.com/相同的响应p/{post_shortcode}/?__ a = 1
。重要的一点:
用户代理
很重要。我发现当开发工具中的重新订购请求返回“对不起,出了问题出了问题”
错误时,我发现了生成的firefox。这是完整的脚本。让我知道这是否有帮助!
I believe I may found a workaround using:
https://i.instagram.com/api/v1/users/web_profile_info/?username={username}
to get the user's info and recent posts.data.user
from the response is the same asgraphql.user
fromhttps://i.instagram.com/{username}/?__a=1
.<meta property="al:ios:url" content="instagram://media?id={media_id}">
in the HTML response ofhttps://instagram.com/p/{post_shortcode}
.https://i.instagram.com/api/v1/media/{media_id}/info
using the extracted media id to get the same response ashttps://instagram.com/p/{post_shortcode}/?__a=1
.A couple important of points:
user-agent
used in the script is important. I found the one Firefox generated when re-sending requests in the dev tools returned the"Sorry, something went wrong"
error.Here's the full script. Let me know if this is helpful!
用户代理:
/?__ a = 1替代端点;
但是,您应该将用户代理使用此端点。
v1/users/web_profile_info/?username = {username}
data.graphql.user = data.user
给出相同的结果
User-Agent:
/?__a=1 alternative endpoint;
BUT You should put user-agent for using this endpoint.
https://i.instagram.com/api/v1/users/web_profile_info/?username={username}
data.graphql.user = data.user
give same result
IG修改了该方法,
使用了新方法:
下一页:
ig modified the method,
used the new method:
next page:
我也有你的问题。我目前正在使用替代解决方案来找到确定的解决方案。
我设计了一个离线API,以将链接转换为媒体ID。要使用它,请提交请求如下:
您将收到媒体ID,而不是此链接,而是列出任何其他链接。当然,我强调这是离线的,我可以指导您知道喜欢的确切数量和其他帖子信息。因此,让我知道您是否需要更多帮助。祝你好运。
I have your problem too. I am currently using an alternative solution to find a definitive solution.
I have designed an offline api to convert links to media IDs. To use it, submit a request as follows:
http://api-bot.ir/api/insta/media_id/?url=https://www.instagram.com/p/CP-Kws6FoRS/
Instead of this link, put any other link, you will receive a media ID. Of course, I emphasize that this is offline, and I can guide you to know the exact number of likes and other post information. So let me know if you need more help. Good luck.