【问题标题】:Get Instagram photos by tag, via php通过标签获取 Instagram 照片,通过 php
【发布时间】:2020-06-16 04:32:10
【问题描述】:

我通过 file_get_contents 然后preg_match pics 获取数据,它已经工作了两年,但现在停止了。 Insta 拒绝并加载空的 html 页面。你知道怎么解决吗?

<?
file_get_contents("https://www.instagram.com/explore/tags/roofers");
preg_match( "/window._sharedData \=(.+),\"is_canary/im", $str, $matches );
...
?>

【问题讨论】:

    标签: php instagram file-get-contents


    【解决方案1】:

    Instagram 更改了他们的身份验证规则,现在只有登录用户才能访问公共照片。您可以改用 Instagram API。

    https://developers.facebook.com/docs/instagram-api/reference/user/media#get-media

    【讨论】:

      【解决方案2】:

      好吧,如果有人有同样的 quiestino 麻烦,那是在另一边 我试图从公共托管 iP add 中获取页面,但被 instagram 阻止

      所以查询工作得很好,即使这样,它也可以从这个 GET 中为您提供 json_feed

      https://www.instagram.com/explore/tags/NEEDED_HASHTAG/?__a=1
      

      没有任何解析:-)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多