gpt4 book ai didi

php - 如何获取 Instagram 中其他页面的关注者数量?

转载 作者:行者123 更新时间:2023-12-03 01:54:44 25 4
gpt4 key购买 nike

是否有可能获得 Instagram 中其他页面的关注者数量?我只能获取我的个人资料关注者数量,但我也想获取其他关注者? (例如在 php 中)

有什么想法吗?

最佳答案

是的,可以使用返回 json 的 ?__a=1 查询。

$otherPage = 'nasa';
$response = file_get_contents("https://www.instagram.com/$otherPage/?__a=1");
if ($response !== false) {
$data = json_decode($response, true);
if ($data !== null) {
$follows = $data['graphql']['user']['edge_follow']['count'];
$followedBy = $data['graphql']['user']['edge_followed_by']['count'];
echo $follows . ' and ' . $followedBy;
}
}

关于php - 如何获取 Instagram 中其他页面的关注者数量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34906301/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com