Coder Social home page Coder Social logo

ohld / igbot Goto Github PK

View Code? Open in Web Editor NEW
4.6K 348.0 1.5K 23.93 MB

🐙 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

Python 99.83% Dockerfile 0.05% Shell 0.12%
python api-wrapper instagram bot instabot like follow comment instagram-bot instabotpy

igbot's People

Contributors

ademaro avatar adw0rd avatar akwokwh avatar alexshavelev avatar art-vasilyev avatar ayush3298 avatar basnijholt avatar bobzombie69 avatar bruvv avatar dependabot-preview[bot] avatar drcherry avatar eightshift avatar elonpark avatar ermiyaeskandary avatar ivanychev avatar leoccyao avatar marco2012 avatar maxdevblock avatar maxpierini avatar nikolasvargas avatar ofou avatar ohld avatar olcaey avatar oyetomi avatar ppleskov avatar pyup-bot avatar rasperepodvipodvert avatar sudoguy avatar tkd-alex avatar woollover 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

igbot's Issues

Make scraping process slimer and faster

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.

check existing comments

Bot comments on previously commented pictures leading to spam ...please implement check_existing_comments .
Thanks :)

DEVELOPERS: Follower queue experiment

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.

Like_user

Add to like_user function the ability to

Like and follow last media likers and like his last media liker and follow them.

User and media info ideas.

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/

Create checkpoints for stats

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.

Implement proxy

We need to implement proxy support because instagram ban sessions from "strange countries".

DEVELOPERS: Find account's limits

I want to know the limits of

  • like per day
  • unlike per day
  • follow per day
  • unfollow per day
  • comment per day
  • something else.

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.

DEVELOPERS: Group bot's method for better structure.

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:

  • user getters (users from media likes, from hashtag posters, from user's followers, etc.)
  • media getters (by hashtag, by user, by geotag, etc.)
  • like methods (medias, user's medias, by hashtag, geotag, etc.)
  • follow methods (users, users from hashtag, users from geotag, etc.)
  • something that i forget
  • something more

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

  • the file name with methods you suggest and
  • the list of methods that would be there

After we agreed with that renaming and moving you can do a pull request with the corrections.

DEVELOPERS: Implement language packs for comment system

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.

list of follower and non followers

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

switch between account

hi bro thank u for the script
is there any way to switch between account?
log out from one account and login with another

`comment_hashtag` crashes. `.delay` is not defined

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

DEVELOPERS: time delays control

We should think about time delays in a project:

  • Where we should put delays in code? (in like/follow or in more higher level functions)
  • How we can control delays throw code? (fast and dangerous / slow and comfort)

And ideas?

Feed commenter

Can you please try to implement a feed commenter, using only emojis, so as not to make comments weird,, this improves exposure,,,, thanks

Examples description

Really miss any docs specifying what do the scripts from ./examples/ perform.

comment_hashtag.py error

when running on command line i got these errors , python is reading comments.txt as syntax/code
errorbot
r

Python says emoji is NON ASCII character requires utf coding , is that possible adding it a text file?
emoji error

like_hashtag() doesn't work like it used to.

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

Logging error when liking users from file.

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
screenshot_8

DEVELOPERS: add location (geo tag) to a post

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'"}

DEVELOPERS: Implement dialogue interface

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.

DEVELOPERS: Bot class test script

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.

DEVELOPERS: Ultimate 24/7 script

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

  • with hashtags to like and follow
  • with a list of users for the same thing
  • with comments base for commenting.

Workflow:

  • Choose what to do: hashtag/user
  • like and follow medias according to the choice
  • don't forget to use limits to prevent ban.

DEVELOPERS: Code structure and dividing into low level and high level methods.

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.

Like users from file error

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)

screenshot_5
screenshot_4
users_to_follow.txt

add filtration to liked users, not only to followed users

Фильтрация пользователей действия над которыми применяются.
Например хочу залайкать по хэштегу только тех у кого от 1 до 30 лайков на последние фотки....

Фильтры:

  • - по количеству у них фоловеров
  • - по количеству у них лайков на последние фотки
  • - по количеству у них коментариев на последние фотки
  • - по количеству у них тех кого они фоловят
  • - по гео (было бы здорово)

Direct message

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.

DEVELOPERS: Filter real users / bots / commercials

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?

Implement Blacklist and Whitelist

Add Blacklist for follow function so that bot dont follow certain users. Also add White-list so bot don't unfollow white-listed users

DEVELOPERS: Media Class and User Class creation

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:

  • media_id
  • owner_id
  • is_liked
  • is_commented (we can calculate this field)
  • even more that i forget

User getters would return a list of User Classes with fields:

  • user_id
  • username
  • medias
  • number of followers / following
  • set of followers / following

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?

Filtration

Filtering by number of followers and followed
For example:
"followers_max = 1000
followers_min = 100"

Implement New mode

Pick a recently uploaded picture from your feed, follow a liker, like 3 pictures of the liker, Repeat..
Thanks.

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.