instagram bot with python

in #utopian-io7 years ago (edited)

installation : https://github.com/hakancelik96/instagram clone or download and

Technology

I've used the following to create this bot or program:

pip install requests
pip install BeautifulSoup4

usage

>>> from instagram import Instagram as I 

let's include or import your project

>>> user_info = I.userinfo("hakancelik.py")

get information before signing in about user hakancelik.py

>>> user_info["logging_page_id"]

get user hakancelik.py's page_id

>>> user_info["user"]["id"] # for user id
>>> user_info["user"]["full_name"] 

for full name

>>> I = I("username", "password") 

create a session

>>> I("username", "password", True)

if you want to use proxy,use this

>>> I.username

username

>>> I.password

password

>>> I.useragent 

gives random useragent

>>> I.s  

gives requests session

>>> I.s.proxies 

you gives fake proxy ex: 165.321.51.21:8050

>>> I.login()

to login instagram

>>> I.isloggedin 

To check whether loggedin or not return False or True

>>> I.follow(user_id = 3) 

kevin to send follow request return {'result': 'following', 'status': 'ok'}

>>> I.follow(username = "hakancelik.py") 

for me {'result': 'following', 'status': 'ok'}

>>> I.unfollow(user_id = 3) 

kevin to send unfollow request return {'status': 'ok'}

>>> I.unfollow("hakancelik.py") 

for me {'status': 'ok'}

>>> I.logout() 

to logout instagram

>>> I.signup(first_name="first_name",email="email")

to new account for instagram

result

>>> from instagram import Instagram as session
>>> session = session("hakancelik.py","password")
>>> session.login()
{'authenticated': True, 'user': True, 'status': 'ok'}
>>> session.unfollow(username = "coogger.v1")
{'status': 'ok'}
>>> session.follow(username = "coogger.v1")
{'result': 'following', 'status': 'ok'}
>>> info = session.userinfo(username = "coogger.v1")
>>> info["user"]["biography"]
'Bilgi paylaşım platformu'
>>> info["user"]["id"]
'5680303504'
>>> info["user"]["full_name"]
'coogger'
>>> 

image

image

to do

  • report bug or error
  • commenting feature
  • users' see and download shares
  • send a message to users
  • see accounts who users is follow and they send follow request or another features

fork me on github
turkish tutorial



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Güzel post olmuş 👊

Your contribution cannot be approved because it does not follow the Utopian Rules.

You created a Development Task Request.

Task Requests
Task requests are meant to be made by the project owner when looking for contributions.
A task must be explained in great detail and provide all the necessary details for it to actually be completed.

Developers
In this category you can only write if you are looking for developers joining your crew.

You probably just meant to share your project. You have to read the rules more carefully to decide which category you chose and what information you need to provide.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.16
TRX 0.25
JST 0.034
BTC 94126.54
ETH 2654.67
USDT 1.00
SBD 0.69