遇到错误尝试从Instagram抓取数据。

huangapple go评论55阅读模式
英文:

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)

但我收到了以下错误信息:

遇到错误尝试从Instagram抓取数据。

有人能帮助我找出是什么原因导致了这个错误吗?

谢谢。

英文:

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:

遇到错误尝试从Instagram抓取数据。

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

https://instaloader.github.io/

英文:

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/

huangapple
  • 本文由 发表于 2023年2月6日 14:01:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75357816.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定