douqingzhi0980 2016-11-09 02:13
浏览 48
已采纳

通过网络搜索获取Instagram公开个人资料数据

I try to retrieve some public profile data from instagram without take a use of the API. I already used file_get_contents and extract the _sharedData. But this method slow down the performance extremly (5 Seconds to load) so for production it is nonesense.

I've seen in one stackoverflow question, that they called http://instagram.com/web/search/topsearch/?query=user_id to access at least the number of followers. But there are no further details.

Is there any documentation about this web search or some solution to access public profile data with instagrams web search? I need at least the counts for media, followers and followed-by.

  • 写回答

1条回答 默认 最新

  • dongyi3616 2016-11-16 10:45
    关注

    You can add ?__a=1 to the url and get json only:

    https://www.instagram.com/facebook/?__a=1
    

    It contains public profile data which you've mentioned:

    user:
        follows:
            count
        followed_by:
            count
        media:
            count
    

    It tooks about 280ms for me.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误