python - 获取与特定 IG 页面互动最多的关注者列表
问题描述
我想获取页面上点赞和评论最多的用户的信息。例如,与页面互动最多的 100 位顶级关注者。
我使用 Instaloader 存储库并使用以下代码,我能够获取页面的关注者列表。但我不知道找到对该页面参与度最高的关注者
import instaloader
from instaloader import Profile
username="my_username"
password="my_password"
L = instaloader.Instaloader()
L.login(username, password)
target = 'target_page_for_scrape_followers'
profile = instaloader.Profile.from_username(L.context, target)
file = open(target + '_followers.txt', "a+")
print(file)
for followers in profile.get_followers():
username = followers.username
file.write(username + "\n")
print(profile)
print(username)
file.close()
print("***************************************************************************************** \n")
我怎样才能做到这一点?提前感谢任何可以帮助我的人。
解决方案
推荐阅读
- python - Python:重采样和前向填充到最近一个月
- graph - 如何将表格导出为 png 文件?
- python - 无法从 JWT 导入 TokenObtainPairView、TokenRefreshView
- javascript - 如何让 Chrome 扩展程序休眠一段时间并在端口上发布消息
- python - 优化大型excel文件的处理
- javascript - 如何使用javascript为每个表行打印不同的值
- ide - Liferay Cloud IDE,多个开发人员在同一个 liferay 服务器上工作
- php - Laravel 将退出状态代码任意设置为自定义命令
- ios - 旋转图像后缺少缩放
- sql-server - 计算日期范围内的星期六数 - SQL