Instagraapi在我的请求中返回错误的答案,不能将请求发送到Instagram的返回错误

发布于 2025-02-08 15:04:17 字数 1201 浏览 4 评论 0原文

登录后,我正在尝试通过Instagrapi将请求发送到Instagram:

def parse_one_user(client: InstClient, user: str):

    try:
        print('one user parse started!')
        data = []
        print('user : ' + user)
        userid = client.get_user_id(user.strip())
        print(user + "userid")
        bio = client.get_bio(userid)
        print(bio)
        follows = client.get_follows(userid)
        print(follows)
        followers = client.get_followers(userid)
        print(followers)
        posts = client.get_posts(userid)
        print(posts)
        data.append(bio)
        data.append(follows)
        data.append(followers)
        data.append(posts)
        return data
    except Exception as e:

        print(e)
        return False

我遇到了这个问题


    Status 200: JSONDecodeError in public_request (url=https://www.instagram.com/miami.autorent/?__a=1) >>> for (;;);{"__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":1005710968}}},"lid":"7110886975666527111"}

,这意味着Instagrapi的工作错误?

i am trying send request to instagram by instagrapi after logining:

def parse_one_user(client: InstClient, user: str):

    try:
        print('one user parse started!')
        data = []
        print('user : ' + user)
        userid = client.get_user_id(user.strip())
        print(user + "userid")
        bio = client.get_bio(userid)
        print(bio)
        follows = client.get_follows(userid)
        print(follows)
        followers = client.get_followers(userid)
        print(followers)
        posts = client.get_posts(userid)
        print(posts)
        data.append(bio)
        data.append(follows)
        data.append(followers)
        data.append(posts)
        return data
    except Exception as e:

        print(e)
        return False

i have this problem


    Status 200: JSONDecodeError in public_request (url=https://www.instagram.com/miami.autorent/?__a=1) >>> for (;;);{"__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":1005710968}}},"lid":"7110886975666527111"}

Does it means that instagrapi work wrong??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

驱逐舰岛风号 2025-02-15 15:04:17

这不是错误,因为它具有200个状态代码。
只是直接从Instagram发出警告。
即使出现在您的终端中的错误,它也不会停止脚本。
我在日志文件中遇到了相同的问题,但是我不干扰您的代码。

This isn't an error since it has a status code of 200.
Just a Warning from Instagram Directly.
Even if the error shows up in your Terminal it wont stop the script.
I have the same issues in my log files, but i doesn't interfer with your code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文