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
- etc ... for more information read userinfo.md
>>> 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'
>>>
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