ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.69k stars 1.47k forks source link

Follow Users by Hashtag-Allow Business #572

Closed chadholman closed 5 years ago

chadholman commented 6 years ago

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.

basnijholt commented 6 years ago

https://github.com/instagrambot/instabot/blob/master/instabot/bot/bot.py#L69

instabot.Bot(filter_business_accounts=False)

chadholman commented 6 years ago

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.

chadholman commented 6 years ago

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.

basnijholt commented 6 years ago
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)
imachref commented 6 years ago

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 ?

chadholman commented 6 years ago

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

chadholman commented 6 years ago

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

imachref commented 6 years ago

@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 ..

basnijholt commented 6 years ago

https://www.codecademy.com/learn/learn-python

imachref commented 6 years ago

comeon dude ..

basnijholt commented 6 years ago

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.)

imachref commented 6 years ago

.. 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'

basnijholt commented 6 years ago

change it into:

bot = Bot(filter_business_accounts=False)
imachref commented 6 years ago

worked <3 thnx alooot

Areahints commented 6 years ago

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

Areahints commented 6 years ago

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

Areahints commented 6 years ago

help please @basnijholt @chadholman

Areahints commented 6 years ago

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.

stale[bot] commented 5 years ago

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.