Giter Site home page Giter Site logo

subzeroid / instagrapi Goto Github PK

View Code? Open in Web Editor NEW
3.7K 3.7K 602.0 5.54 MB

🔥 The fastest and powerful Python library for Instagram Private API 2024

Home Page: https://hikerapi.com/p/bkXQlaVe

License: MIT License

Python 99.70% Dockerfile 0.10% Shell 0.20%
api-wrapper instabot instagram instagram-account instagram-api instagram-api-python instagram-automation instagram-bot instagram-client instagram-crawler instagram-downloader instagram-feed instagram-photos instagram-private-api instagram-scraper instagram-sdk instagram-stories instagrapi instaloader instapy

instagrapi's People

Contributors

a13sha avatar adityaa-codes avatar adw0rd avatar anaddafi avatar blackphoenix134 avatar dependabot[bot] avatar dzeitounperen avatar elmissouri16 avatar ghrlt avatar jammy108 avatar jarrodnorwell avatar jashparekh avatar leraner avatar mertyuce1 avatar msk-psp avatar nebula0225 avatar nil-malh avatar noqcks avatar phelan164 avatar rickturner2001 avatar saeidb avatar sebo-the-tramp avatar stampixel avatar subzeroid avatar tonycpsu avatar trashmit avatar truroshan avatar vltclz avatar will-holley avatar yessirskiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instagrapi's Issues

API rate limits

I searched a lot to find rate limits of Instagram private API but there was nothing, (i.e how many requests per minute are allowed to call and how many accounts we can login by an IP.)
Do you have any reference to prevent flood and reduce risk of account removal by Instagram?

Doesn't work with pyinstaller

Probably a minor issue but something that will help me and alot of others in the long term.

Basically i tried to turn a program of mine that uses this module to an exe using pyinstaller but it doesn't work, i did some testing and using a script to just try to login to instagram with this module doesn't work when used with pyinstaller. I was getting an ImportError in both cases.

I was looking around for solutions and came across this issue explosion/spaCy#5035 and it was fixed by someone creating a hook for the module and wondering if any of you could make one for this module.

Thanks

Status 429: Too many requests

`userr_id_main = cl.user_id_from_username('someuser')

User followers of the main user

user_followers = cl.user_followers(userr_id_main)`

Status 429:Too many requests;
How to slow down the requssts some of the users I need to check followers are with 19k followers to 192k followers.I need to set some time sleep but when I use user_followers() I don`t know how to do it.

Editing Bio

Thanks for the great API wrapper!

It would be great if a way to edit the logged in account's bio could be added! Things such as changing the profile picture, name, bio, link etc.

No problem if it can't be done, thanks.

infinity loop in hashtag_medias_top_a1

I am using the hashtag_medias_top method and it is iterating infinitely in hashtag_medias_top_a1 (average remains at 8 and never increases to 9 which is the amount)

Error installing module

pip install instagrapi
Collecting instagrapi
  Using cached instagrapi-1.1.6.tar.gz (43 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\neman\\AppData\\Local\\Temp\\pip-install-qsq4ll05\\instagrapi\\setup.py'"'"'; __file__='"'"'C:\\Users\\neman\\AppData\\Local\\Temp\\pip-install-qsq4ll05\\instagrapi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\neman\AppData\Local\Temp\pip-pip-egg-info-53fxevhp'
         cwd: C:\Users\neman\AppData\Local\Temp\pip-install-qsq4ll05\instagrapi\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\neman\AppData\Local\Temp\pip-install-qsq4ll05\instagrapi\setup.py", line 13, in <module>
        install_requires=[item.strip() for item in open(
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\neman\\AppData\\Local\\Temp\\pip-install-qsq4ll05\\instagrapi\\requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Clear the old query in new api call

Do it have some function like clear the old query.Because when I make a search for followers of an user it save the search on the next search give me same result.I am not sure its from my flask application or is it from the bot.Thanks
ps.Definitely is from the api I try on simple script if I not close it didn`t load the updated information

Problem deploying on Heroku

I made web application with flask witch use the api.In my local machine work fine when I deploy to heroku I recive this error message:

2020-12-27T12:07:08.823479+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/instagrapi/mixins/private.py", line 207, in _send_private_request
2020-12-27T12:07:08.823479+00:00 app[web.1]:     raise LoginRequired(response=e.response, **last_json)
2020-12-27T12:07:08.823663+00:00 app[web.1]: instagrapi.exceptions.LoginRequired: login_required

What will be the problem.It can be something from the api or I have problem with app thanks

Account registration

Здравствуйте, будет ли реализация регистрации?

Error 429 following followers

I get error 429. Any way to bypass it? Tried using proxy but same error.

Code:

from instagrapi import Client
import sys

cl = Client()
cl.set_proxy("http://XXXXX:XXXXX")
print("Logging in...")
cl.login(sys.argv[1], sys.argv[2])
print("Getting followerws of "+sys.argv[3])
follow_id = cl.user_id_from_username(sys.argv[3])

to_follow = cl.user_followers_v1(follow_id)
count = 0
for tf_id, tf_data in to_follow.items():
    count += 1
    print("Following user "+tf_data.username+" "+str(count)+"/"+str(len(to_follow)))
    cl.user_follow(tf_id)

Log:

Logging in...
Getting followerws of XXXXX
Status 429: Too many requests
Traceback (most recent call last):
  File "C:\Users\Jaime\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instagrapi\private.py", line 181, in _send_private_request
    response.raise_for_status()
  File "C:\Users\Jaime\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg + "\nBody: "+self.text, response=self)
requests.exceptions.HTTPError: 429 Client Error: - for url: https://i.instagram.com/api/v1/friendships/XXXXX/followers/?max_id=&rank_token=XXXXX
Body: {"message": "Please wait a few minutes before you try again.", "status": "fail"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\follow2.py", line 11, in <module>
    to_follow = cl.user_followers_v1(follow_id)
  File "C:\Users\Jaime\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instagrapi\user.py", line 230, in user_followers_v1
    result = self.private_request(
  File "C:\Users\Jaime\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instagrapi\private.py", line 313, in private_request
    raise e
  File "C:\Users\Jaime\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instagrapi\private.py", line 300, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "C:\Users\Jaime\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instagrapi\private.py", line 242, in _send_private_request
    raise PleaseWaitFewMinutes(e, response=e.response, **last_json)
instagrapi.exceptions.PleaseWaitFewMinutes: Please wait a few minutes before you try again.

Remove moviepy

To simplify the library, take it out as an example in a separate file

Video tutorials

Mikhail Andreev, [27.12.20 23:58]
If someone create video tutorials, I will be grateful, but I don’t have time for that yet 😞

Edi, [28.12.20 00:33]
Could you help me to do guides in text so I understand the principles and then I could make video tutorials 😁

https://t.me/instagrapi/605

Add types instead dicts

Types:

  1. Resource
  2. User
  3. UserShort
  4. Usertag
  5. Location
  6. Media
  7. MediaOembed
  8. Collection
  9. Comment
  10. Story
  11. StoryMention
  12. StoryBuild
  13. DirectMessage
  14. DirectThread

Already Liked

Hi, is there any way to know if a Media has already been liked by the logged user?
Thank you.

ModuleNotFoundError: No module named 'instagrapi.mixins' Trying to deploy on heroku

I am trying to deploy on heroku its install put return me this error.Any advice

Traceback (most recent call last):
File "after_loop.py", line 1, in
from instagrapi import Client
File "/app/.heroku/python/lib/python3.6/site-packages/instagrapi/init.py", line 4, in
from instagrapi.mixins.auth import LoginMixin
ModuleNotFoundError: No module named 'instagrapi.mixins'

Unhandled Challenge Exception

Exception: ChallengeResolve:
Unknown step_name "submit_phone" for "xxxxxx" in challenge resolver: {'step_name': 'submit_phone', 'step_data': {'phone_number': '+1234567890'}, 'cni': 17964459592361911, 'challenge_type_enum_str': 'SMS', 'status': 'ok'}

Like and Unlike features

Hello all!
Is there a method to insert/remove like on a post, comment, etc?
Thank you all, and good job!

How to start using?

Please add an example to show how to start and use this library.
How to login and save cookies to prevent relogin?
Thanks for this great warper.

Add search media by place id feature

In the media methods there is no option to search for media by instagram place id. This would be very useful for researchers and should be fairly easy to implement. Thanks!

Story Mention

I got a problem when uploading the story and then mentioning, there was no writing when someone saw the story, but the mention was successful, it's just that someone couldn't click the mention because there was no writing / name of the person mentioned

Изображения в директ

Здравствуйте, я правильно понимая что отправка сообщений через директ не поддерживается?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.