Igbot: Follow Users by Hashtag-Allow Business

Created on 20 Jun 2018  路  19Comments  路  Source: ohld/igbot

I'm hoping someone can help me include businesses when following users by hashtag rather than: "info: is BUSINESS, skipping!"

I've gone through bot.py and bot_filter.py and tried changing some variables with no effect.

stale

All 19 comments

Thanks @basnijholt, I had changed line 69 to false in the past without any effect. I've fetched the latest instabot and attempted again with no effect.
Should I be adding or modifying this line: instabot.Bot(filter_business_accounts=False) somewhere? I'm running an ultimate schedule.
Regards.

this is the code from the script i'm running, making the change to False in bot.py has no effect:

-- coding: utf-8 --

from glob import glob
import os
import sys
import threading
import time

sys.path.append(os.path.join(sys.path[0], '../../'))
import schedule
from instabot import Bot, utils

import config

bot = Bot(comments_file=config.COMMENTS_FILE,
blacklist_file=config.BLACKLIST_FILE,
whitelist_file=config.WHITELIST_FILE,
friends_file=config.FRIENDS_FILE)
bot.login()
bot.logger.info("ULTIMATE script. Safe to run 24/7!")

random_user_file = utils.file(config.USERS_FILE)
random_hashtag_file = utils.file(config.HASHTAGS_FILE)

def stats():
bot.save_user_stats(bot.user_id)

def like_timeline():
bot.like_timeline(amount=700 // 24)

def follow_users_from_hastag_file():
bot.follow_users(bot.get_hashtag_users(random_hashtag_file.random()))

schedule.every(9).minutes.do(stats)
schedule.every(5).minutes.do(like_timeline)
schedule.every(1).days.at("2:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("4:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("6:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("8:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("10:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("12:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("14:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("16:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("18:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("20:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("22:40").do(follow_users_from_hastag_file)
schedule.every(1).days.at("0:40").do(follow_users_from_hastag_file)

while True:
schedule.run_pending()
time.sleep(1)


occasionally this will crash out after several cycles.

bot = Bot(comments_file=config.COMMENTS_FILE,
blacklist_file=config.BLACKLIST_FILE,
whitelist_file=config.WHITELIST_FILE,
friends_file=config.FRIENDS_FILE)

should change into

bot = Bot(comments_file=config.COMMENTS_FILE,
blacklist_file=config.BLACKLIST_FILE,
whitelist_file=config.WHITELIST_FILE,
friends_file=config.FRIENDS_FILE,
filter_business_accounts=False)

bot = Bot(comments_file=config.COMMENTS_FILE,
blacklist_file=config.BLACKLIST_FILE,
whitelist_file=config.WHITELIST_FILE,
friends_file=config.FRIENDS_FILE)
where to find this ? i couldn't find it in bot.py ?

Thanks @basnijholt this works great now.
@imachref this goes in the script you are running, no need to modify bot.py

@basnijholt I wonder if you can skip personal accounts and only focus on following business, as in B2B only?

@basnijholt @chadholman
Traceback (most recent call last):
File "instabot/examples/like_and_follow_last_user_media_likers.py", line 24, in
bot = Bot(comments_file=config.COMMENTS_FILE,
this is what i get ..

comeon dude ..

I am sorry, but I can't debug your code from just two lines of the traceback.

Also, I think that you don't really understand what you are doing, so I really recommend learning the basics of Python (which is very easy.)

.. in exactly like_and_follow_last_user_media_likers.py
thers only bot = Bot() which i can remplace it with
bot = Bot(comments_file=config.COMMENTS_FILE,
blacklist_file=config.BLACKLIST_FILE,
whitelist_file=config.WHITELIST_FILE,
friends_file=config.FRIENDS_FILE,
filter_business_accounts=False)

shit
getting undifined name 'config'

change it into:

bot = Bot(filter_business_accounts=False)

worked <3 thnx alooot

hello making the change to False in bot.py has no effect!
filter_business_accounts=False,

i am running the multi_script_CLI.py file

please tell me where to input your code @basnijholt

Hello, in the file follow_users_by_hashtag.py in line 22
bot = Bot (filter_business_accounts=False)

despite this, when i run multi_script_CLI and select follow from hashtag i still see info: is Business, skipping

help please @basnijholt @chadholman

I'm leaving this behind to help anyone who might need, if you followed this guide https://instagrambot.github.io/docs/en/Installation_on_Unix.html
then you installed both the pip and github version, what happens is that the bot.py file you need to edit is in path-to-pip-installation editing the bot.py in the github version wont affect it.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings