ohld / igbot Goto Github PK
View Code? Open in Web Editor NEW🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
Home Page: https://hikerapi.com/p/N2P6iqiM
License: Apache License 2.0
🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
Home Page: https://hikerapi.com/p/N2P6iqiM
License: Apache License 2.0
Are Python Class for Media and Python Class for User worth creation?
So getters (e.g. get medias by hashtag) would return a list of Media Classes. This class would save all fields that Instagram returns:
User getters would return a list of User Classes with fields:
The User Class includes several fields that required more than one request to Instagram. That's why we maybe should use that class only if we require full info (e.g. will be needed for Machine Learning part).
Any suggestions / ideas?
Issue for future developers.
Logging using "print" function is not good. We should use special modules for logging.
Try to use only standard Python libraries to prevent enlarging of the requirements.txt
.
Python standart logging library: https://docs.python.org/3/library/logging.html
add ability to increase or decrease delay for every unfollow.
please can you implement send DM to new followers, welcoming them ,
updated instabot and try run like users from file and show logging error.
run this script by: python penarubah_like_3_media_from_file.py user_to_like.txt
the code is:
import sys
import os
sys.path.append(os.path.join(sys.path[0],'../'))
from instabot import Bot
users_list = "users_to_like.txt"
bot = Bot()
users_to_like = bot.read_list_from_file(users_list)
if not users_list:
exit()
bot.login()
print ("session 1")
bot.like_users(users_to_like, nlikes=1)
print ("session 2")
bot.like_users(users_to_like, nlikes=1)
print ("session 3")
bot.like_users(users_to_like, nlikes=1)
bot.logout()
i atttach file, and screenshoot
users_to_like.txt
rewrite
bot.follow()
bot.like()
....
to count follows/likes/etc.
Frankly speaking, it's too insecure not to delete file with login/password after finishing a session.
We need to implement the script with dialogue interface like this:
Enter username: ykshv
Enter password: {{{{
[12:00:30]: Auth
[12:00:30]: Login success..
Logged in as ykshv
[12:00:30]: What you want to do?
[1]: follow
[2]: unfollow
answer » 1
[12:00:35]: Where from users you want to follow?
[1]: followers
[2]: following
[3]: likes
answer » 3
Enter username: best.video
[12:00:55]: Getting user id..
[12:00:55]: Starting..
[12:00:55]: Getting user media..
[12:00:55]: getMedia 1059547379
...
In the future this script will be converted into Telegram bot's interface. So as soon this script will be implemented we will start to develop Telegram bot.
Now I have very strange project architecture. You can see that by going into bot class sources.
We should decide which functions should be low level and make for them separate files, and which functions are hight level (that uses only low level methods), and make for them another separate files.
So example of hierarchy (if it is bad example - tell me)
Very high level -> High -> ... -> Low -> API
Examples of API methods: like(media_id)
Examples of low level methods: follow_users(users_list)
Examples of high level methods: unfollow non followers
Examples of very high level methods: like_every_day_1000_medias_from_hashtags(hashtag_list)
Last one - ready-to-go scripts (bot mods) that user can run for days (just "run and forget")
I want to build a good hierarchy of methods and I want developers to help me. Thanks.
Add to read the information that al functions can accept as user_id as usernames.
Follow/unfollow by all users who contains in file(by id or user_name). In bot already have this function but for lists
Add to like_user function the ability to
It should output the username, not userid. Occurred in like_user_following.py
Hello!
I tried to implement direct messages by adding
def direct_message(self, userid,messagestxt):
data = json.dumps({
'recipient_users' : str(userid)
'client_context' : str(self.uuid),
'_uuid' : str(self.uuid),
'_uid' : str(self.username_id),
'_csrftoken' : str(self.token),
'thread_ids' : '0',
'text' : 'test message',
})
print self.SendRequest('direct_v2/threads/broadcast/text/', self.generateSignature(data))
print self.LastJson
and I get on the console, from the "print" commands:
Request return 400 error!
False
{u'status': u'fail', u'message': u'Text is missing'}
Do you have any idea / suggestion to make direct messages working?
Thank you.
hi bro thank u for the script
is there any way to switch between account?
log out from one account and login with another
Can you please try to implement a feed commenter, using only emojis, so as not to make comments weird,, this improves exposure,,,, thanks
Current landing page: ohld.github.io/instabot
It is simple but not cool. If someone have possibility to develop a Logo for Instabot and make better landing page that would be great!
I found some services that can help you to create a landing page:
Today structure of bot's class is not searchable and sometimes not readable. https://github.com/ohld/instabot/tree/master/instabot/bot
So i'm thinking about to regroup the methods even with renaming methods and files if necessary. It will help to write a clear documentation, not just a one big list of all methods like we have now at Readme.md.
I suggest this groups:
After we did that restructure task we can provide the bot with more clearer documentation and even create an GitHub Pages site to increase the bot's community.
If you want to help with that issue please first comment there
After we agreed with that renaming and moving you can do a pull request with the corrections.
Please implement comments for like by tags .
Thanks in advance :)
We can get this user info data (an an example i took ohld account).
{
u'usertags_count':86,
u'has_anonymous_profile_picture':False,
u'hd_profile_pic_versions':[
{
u'url': u'http://scontent.cdninstagram.com/t51.2885-19/s320x320/15538614_588086268066248_8179405133763837952_a.jpg',
u'width':320,
u'height':320
}
],
u'following_count':837,
u'usertag_review_enabled':False,
u'can_boost_post':False,
u'full_name':u'\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800Daniil Olegovich',
u'biography':u'\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800\u2800direct me',
u'is_profile_action_needed':False,
u'has_chaining':True,
u'media_count':241,
u'include_direct_blacklist_status':True,
u'follower_count':1514,
u'pk':352300017,
u'is_verified':False,
u'username':u'ohld',
u'can_create_sponsor_tags':False,
u'geo_media_count':0,
u'profile_pic_url': u'http://scontent.cdninstagram.com/t51.2885-19/s150x150/15538614_588086268066248_8179405133763837952_a.jpg',
u'profile_pic_id':u'1412390324475854399_352300017',
u'can_see_organic_insights':False,
u'can_convert_to_business':True,
u'is_private':False,
u'is_business':False,
u'show_business_conversion_icon':False,
u'show_feed_biz_conversion_icon':False,
u'show_conversion_edit_entry':True,
u'show_insights_terms':False,
u'hd_profile_pic_url_info':{
u'url': u'http://scontent.cdninstagram.com/t51.2885-19/15538614_588086268066248_8179405133763837952_a.jpg',
u'width':498,
u'height':498
},
u'is_needy':False,
u'external_url':u''
}
How can we use this data? Ideas?
The description of some fields: http://www.adweek.com/digital/instagram-features-business-profiles-code/
We should think about time delays in a project:
And ideas?
Related php code: mgp25/Instagram-API#34 (klawdyo commented on Apr 17, 2016)
Trying to change configurePhoto in api_photo.py by adding:
'location' : { 'external_source': 'facebook_places', 'facebook_places_id': 115213835158481, 'lng': 108.1, 'lat': 10.9333, 'name': 'Phan Thiet', 'city': '', 'address': '', 'pk': 216918627 },
but got the following error:
<Response [500]>
{'status': 'fail', 'message': "Other media configure error: b'E3v4zLVnwi'"}
When the bot starts up, I'd like to write the version to the log file. There are a few strategies for this on stackoverflow.
Pick a recently uploaded picture from your feed, follow a liker, like 3 pictures of the liker, Repeat..
Thanks.
add the ability to held multiply accounts.
Take a look at this branch:
DrCherry@202f025
I'm trying to start a queue for users_to_follow and I'm hoping to tackle the queue async and have the bot plow on to the next task, filling another like queue.
I've created the QueueFollow and have yet to write the worker. Thoughts on this welcome.
There's comment.txt
and logged in successfully
from instabot import Bot
bot = Bot()
bot.login()
# ...
bot.comment_hash
bot.comment_hashtag("doge")
leads to
...
/home/iv/venv/local/lib/python2.7/site-packages/instabot/bot/bot_comment.pyc in comment(self, media_id, comment_text)
18 return True
19 if limits.check_if_bot_can_comment(self):
---> 20 delay.comment_delay(self)
21 if super(self.__class__, self).comment(media_id, comment_text):
22 self.total_commented += 1
NameError: global name 'delay' is not defined
Filtering by number of followers and followed
For example:
"followers_max = 1000
followers_min = 100"
Since I've implemented the way to comment medias, we need to have a database of comments to use.
As an example I've created a small set of emoji comments here. Emoji is cool way to comment because it is international.
But this base is not large enough. We should enlarge it.
Also there is a way to create comments_english.txt database with english comments. Also another languages packs can be added.
We need to implement function that returns user_id by username.
Фильтрация пользователей действия над которыми применяются.
Например хочу залайкать по хэштегу только тех у кого от 1 до 30 лайков на последние фотки....
Фильтры:
We need to have the ability to filter bots and commercial accounts (don't like and follow them), so we should interact with real users only. Am i right?
In bot_filter.py
i've started to write this function called check_user(self, user_id). We just need to find the way how to define this accounts.
E.g. conditions based followers / following ratio, based on description, links in account etc.
What conditions can you suggest?
We need to test our Instabot to prevent stupid misprints and make pull request checking easier. So we need to write the script that will check the main part of Instabot.
And later add it into Travis, may be special Instagram acc will be needed for that.
I'd expect to be able to iterate through a list of hashtags like I could before the last pull:
hashtags_like = ['thing1','thing2']
for tag in hashtags_like:
bot.like_hashtag(tag)
Perhaps we now need to populate get_hashtag_medias?
[root@drcherry examples]# python kd8qzz.py
Login success!
Going to like medias by lolita hashtag
Traceback (most recent call last):
File "kd8qzz.py", line 28, in <module>
bot.like_hashtag(tag)
File "/home/scherry/sandbox/instabot/instabot/bot/bot.py", line 170, in like_hashtag
return like_hashtag(self, tag, amount)
File "/home/scherry/sandbox/instabot/instabot/bot/bot_like_feed.py", line 23, in like_hashtag
medias = bot.get_hashtag_medias(bot, hashtag)
AttributeError: 'Bot' object has no attribute 'get_hashtag_medias'
Bot stopped. Worked: 0:00:00.716074
There's a method of pull a list of users id, from feed, from hashtags?
We need to implement proxy support because instagram ban sessions from "strange countries".
Bot comments on previously commented pictures leading to spam ...please implement check_existing_comments .
Thanks :)
I am speaking in terms of liking/following/unfollowing/commenting on those that fall under specified #'s. Thanks!
try to run this code by modifying follow_users_from_file.py
But it give long error.
run this script by: python penarubah_like_3_media_from_file.py user_to_follow.txt
the code is:
"""
instabot example
Workflow:
Take users from input file and like 3 latest media of them.
The file should contain one username per line!
"""
import sys
import os
sys.path.append(os.path.join(sys.path[0],'../'))
from instabot import Bot
users_file = "users_to_follow.txt"
bot = Bot()
users_to_like = bot.read_list_from_file(users_file)
if not users_to_like:
exit()
bot.login()
bot.like_users(users_to_like, nlikes=3)
is it possible to create a list of non_follower id's ?
in csv or txt for example
list of non_follower
list of fan
mutual friend
...
tnk u bro
when run follow_followers.py
and like_followers.py
, bot are scraping followers name and execute the list.
i.e: when try to follow followers of 345k account, bot will scrape all of 345k account and then follow with daily limit amount (this case 350).
Is there anyway to only scrape the amount we need, so the scraping process run faster?
maybe only scape followers with latest interaction, or lately post image, or something else.
It would be more effective to filtering interaction with passive account.
Add to like_user function the ability to
Like and follow last media likers and like his last media liker and follow them.
Hi there.
We need to develop a script that could be run 24/7 without editing the code. It should not only like but follow and comment. Usage of the script should be easy enough: just run the code without any corrections (or only files with hashtags/users).
I see the code structure this way:
Create a folder examples/ultimate
, create there a text files
Workflow:
Really miss any docs specifying what do the scripts from ./examples/
perform.
Add Blacklist for follow function so that bot dont follow certain users. Also add White-list so bot don't unfollow white-listed users
New feature of instagram:
http://www.imore.com/you-can-include-multiple-photos-instagram-post-heres-how
Any ideas on API?
For example:
"stop_words_list=['shop', 'gain', 'followers']
Implement checkpoints or milestones pointing to certain state of account, so that bot could revert back to it after doing a follow/unfollow script run.
I want to know the limits of
I don't know how Instagram limits the accounts (may be even not per day, but per hour, etc.). If you have some current information about limits, please share.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.