Instagram API:json响应中缺少元素

Instagram API:json响应中缺少元素,instagram,instagram-api,Instagram,Instagram Api,我正在使用Instagram的端点从tag获取图像和视频。根据文档,以下是videomediajson的外观(为简洁起见跳过其他字段): 因此,对于具有type=video的每个媒体json,都应该有一个videos元素。然后我尝试了一个带有quakeroats标记的请求,下面是url: https://api.instagram.com/v1/tags/quakeroats/media/recent?access_token=<access_token> 它似乎将类型设置为视频,

我正在使用Instagram的端点从tag获取图像和视频。根据文档,以下是
video
media
json
的外观(为简洁起见跳过其他字段):

因此,对于具有
type=video
的每个媒体
json
,都应该有一个
videos
元素。然后我尝试了一个带有
quakeroats
标记的请求,下面是url:

https://api.instagram.com/v1/tags/quakeroats/media/recent?access_token=<access_token>
它似乎将
类型
设置为
视频
,但是没有
视频
元素。此外,媒体链接()似乎指向图像而不是视频

看起来要么是一个bug,要么是API响应格式的最新更改(我只看到导入脚本在过去几天中出现的错误),要么两者兼而有之


还有其他人注意到这一点吗?另外,这是我应该提交给Instagram的吗?

我在尝试更新一些代码以使用其新的多图像(或视频)功能时也遇到了这个问题。Instagram现在允许您将多个图像作为一篇文章上传,然后您可以在UI中在它们之间滑动。看起来API中并未真正考虑到这一点,因此多项目帖子返回为
type=video
(如果它们都是图像,或者可能是
type=multi
或其他新内容,那么它们应该是
type=image


对于我的用例来说,更恼人的是,它们也没有包含关于单个帖子中包含的每个不同媒体项目的必需数据,因此我无法完全重新创建多项目帖子,因为除了“deck”中的第一个图像之外,我什么都不知道。

如果
type=“video”
并且没有“videos”,则当前在API中关键的意思是它是多图像后


(看起来这是一个bug,Instagram最终可能会改变它)

Instagram在没有任何通知的情况下改变了它的行为。
这不是第一次:
我正在培养一批处理这个问题(以及其他问题)的官方客户

pip安装--升级git+https://github.com/MabrianOfficial/python-instagram.git

https://api.instagram.com/v1/tags/quakeroats/media/recent?access_token=<access_token>
{
    "id": "1457772143914843055_4607772970",
    "type": "video",
    "created_time": "1488000003",
    "images": {
        "thumbnail": {
            "height": 150,
            "width": 150,
            "url": "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e35/16788643_240567646348968_4950335324904488960_n.jpg"
        },
        "low_resolution": {
            "height": 320,
            "width": 320,
            "url": "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e35/16788643_240567646348968_4950335324904488960_n.jpg"
        },
        "standard_resolution": {
            "height": 480,
            "width": 480,
            "url": "https://scontent.cdninstagram.com/t51.2885-15/e35/16788643_240567646348968_4950335324904488960_n.jpg"
        }
    },
    "user": {
        "username": "aslapesetme.43kilo",
        "full_name": "\u0130nan\u0131rsan Olur",
        "id": "4607772970",
        "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/16230854_382859295410786_1559541722264895488_a.jpg"
    },
    "user_has_liked": false,
    "link": "https://www.instagram.com/p/BQ7DAqRgPuv/",
    "attribution": null,
    "location": null,
    "likes": {
        "count": 22
    },
    "comments": {
        "count": 0
    },
    "caption": {
        "text": "\ud83d\udca08:00\ud83d\udca0 kahvalt\u0131:\n-50 gr. Yulaf\n-1 bardak s\u00fct\n-1 porsiyon meyve ve 1 \u00e7ay ka\u015f\u0131\u011f\u0131 kakao nibs\nNefiiss \ud83d\ude0b \u00e7ok \u015f\u00fck\u00fcr bizi doyuran rabbimize \ud83d\ude4f\ud83c\udffb Ayr\u0131ca frambuaz ve elman\u0131n sadece renk uyumu de\u011fil tat uyumu da m\u00fcthi\u015f deneyin \ud83d\udc7b\n#healtyfood#healthybreakfast#quakeroats#quakeroatmeal#quakerporridge#milk#apple#raspberries#framboise#ahududu#yulaflapasi#yulafezmesi#porridgelover#porridge#cacaonibs#diyet#diyetkardesligi#diyethesaplaritakiplesiyor#inan\u0131rsanolur#sadeceinan#eceilezayifliyorum#doganinguzelligi#dogalbeslen#kendinisev#benimkahvaltim#nofilter#greentea#whitetea#ginger#hediyenhayatinolsun",
        "from": {
            "username": "aslapesetme.43kilo",
            "full_name": "\u0130nan\u0131rsan Olur",
            "id": "4607772970",
            "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/16230854_382859295410786_1559541722264895488_a.jpg"
        },
        "created_time": "1488000003",
        "id": "17849784529188561"
    },
    "filter": "Normal"
}