英文:
Getting an error when tried to scrape data from instagram
问题
我正在尝试使用instagramy
Python包来抓取一些Instagram数据,按照这个教程:https://pypi.org/project/instagramy/
我使用了以下代码行(在此帖子中我使用了一个虚假的会话ID)
from instagramy import InstagramUser
s_id="55449%3APUiRY9UGd7JMJO%3A2uFFQSOlJinJd3dGKGGsAOvBNzTg"
profile = InstagramUser('google', sessionid=s_id)
但我收到了以下错误信息:
有人能帮助我找出是什么原因导致了这个错误吗?
谢谢。
英文:
I am trying to use instagramy
python package to scrape some instagram data, by following this tutorial: https://pypi.org/project/instagramy/
I used following lines of code (I have used a fake seesion id in this post)
from instagramy import InstagramUser
s_id="55449%3APUiRY9UGd7JMJO%3A2uFFQSOlJinJd3dGKGGsAOvBNzTg"
profile = InstagramUser('google',sessionid=s_id)
But I got following error:
Could anybody help me to figure out what is causing this error?
Thank you.
答案1
得分: 1
Seems like instagram has changed its api, and the library doesn't work anymore therefore github-issue
Maybe @thiindolentone his comment helps you:
from instaloader import Instaloader, Profile PROFILE = "username" L = Instaloader() profile = Profile.from_username(L.context, PROFILE) print(profile.followers)
subsitute followers for followees for followees
for profile you will need to log in. For more info, see
英文:
Seems like instagram has changed its api, and the library doesn't work anymore therefore github-issue
Maybe @thiindolentone his comment helps you:
> python
> from instaloader import Instaloader, Profile
>
> PROFILE = "username"
>
> L = Instaloader()
>
> profile = Profile.from_username(L.context, PROFILE)
>
> print(profile.followers)
>
>
> subsitute followers for followees for followees
>
> for profile you will need to log in. For more info, see
>
> https://instaloader.github.io/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论