Instagram api thumbnail_url给出5xx服务器错误

时间:2019-03-19 11:43:42

标签: instagram instagram-api

thumbnail_url链接仅为幻灯片显示帖子提供5xx Server Error。仅适用于视频和图像帖子。

失败案例:https://www.instagram.com/p/BvEv0AVlgGb

API调用:

https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BvEv0AVlgGb

响应:

{   
    "version": "1.0",   
    "title": "Higher. Further. Faster. Complete your #CaptainMarvel look with these Carol Danvers-approved glasses from @diffeyewear! Shop now at diffeyewear.com #ad",   
    "author_name": "marvel",   
    "author_url": "https://www.instagram.com/marvel",   
    "author_id": 204633036,   
    "media_id": "2000934416420307355_204633036", 
    "provider_name": "Instagram",   
    "provider_url": "https://www.instagram.com",   
    "type": "rich",   
    "width": 658,   
    "height": null,   
    "html": "<blockquote ......>",   
    "thumbnail_url": "https://scontent-sin2-2.cdninstagram.com/vp/d49a6c1ebb809f2a678807c6c668dc20/5D4E7C9B/t51.2885-15/e35/s612x612/51757368_424979878262102_7818160988900314568_n.jpg?_nc_ht=scontent-sin2-2.cdninstagram.com", 
    "thumbnail_width": 612,   
    "thumbnail_height": 611 
}

此图片发布正常运行:https://www.instagram.com/p/BvE6t9fA3BE

为什么缩略图URL仅在图像堆栈中损坏?

1 个答案:

答案 0 :(得分:0)

跟踪此信息的最佳方法是将 __a=1 参数和值添加到原始网址。这将返回一个 GraphQL 响应,其中包含所有必需的信息。

对于上面发布的失败案例:https://www.instagram.com/p/BvEv0AVlgGb,只需将 url 更改为 https://www.instagram.com/p/BvEv0AVlgGb?__a=1