Instagram API POST endpoin的新(ish)要求

2024-09-30 18:25:09 发布

您现在位置:Python中文网/ 问答频道 /正文

我编写了一个python脚本(自动喜欢给定用户定义的hashtags列表的mediaIDs),它使用python-instagram库访问instagram API端点POST /media/media-id/likes。这个程序已经运行了将近一年了,很多朋友(和其他人)都用过它。在

所以,我今天试图通过注册一个新的instagram客户端来建立另一个人。然后我在开发人员登录页上遇到了THIS。声明Instagram要求用户请求访问POST-endpoint。在

下面是代码失败的一个片段:

for mID in mediaIDs:
    #rate limit is 30 requests/hour
    time.sleep(121)
    api_sub2 = igLogin_API()
    try:
        api.like_media(media_id=mID.id)
        like_count +=1
        userIDs.append(mID.user)
        liked_mediaIDs.append(mID)
        img_urls.append(mID.images['standard_resolution'].url)
    except:
        e = sys.exc_info()[0]
        print "already liked %s or %s" % (str(mID),str(e))

引发异常:

^{pr2}$

instagram最终打败了机器人了吗?有人能提供一个工作吗?在


Tags: 用户脚本apiid定义postmediainstagram
1条回答
网友
1楼 · 发布于 2024-09-30 18:25:09

喜欢,关系和评论现在需要批准。在

The ability to POST and DELETE likes, follows and comments is restricted to applications that offer business services and not consumer facing apps. In particular, we may approve only the following types of business services:

• Media rights management: for example a platform for media publishers and brands to request permission from the Instagram Community to use Instagram content.

• Social media management: for example, a platform to help businesses integrate Instagram in their social media workflow

若要请求访问此端点,请填写form

我仍在寻找解决问题的方法。在

相关问题 更多 >