Closed zbagdzevicius closed 6 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.
For the ufeff problem: Open the file you're reading, hashtag.txt, for example Go to Save As... In coding, select ANSI Save it, it will ask you to overwrite, click yes
I had this issue and this solution solved it, hope it helps.
[ + ] Bug report (encountered problems/errors) Python 3.6.2 (v3.6.2:5fd33b5)
Code: import . . . bot=Bot(. . . ) random_user_file = bot.read_list_from_file('user.txt') random_hashtag_file = bot.read_list_from_file('hashtag.txt') random_geotag_file = bot.read_list_from_file('geotag.txt') direct_advertise = bot.read_list_from_file('direct.txt') hashtag_advertise = bot.read_list_from_file('adhashtag.txt')
def get_random(from_list): _random = random.choice(from_list) print("Pasirenkamas atsitiktinis elementas: \n" + _random + "\n") return _random def l_tag(): bot.like_hashtag(get_random(random_hashtag_file)) def l_followers(): bot.like_followers(get_random(random_user_file)) def f_followers(): bot.follow_followers(get_random(random_user_file)) def f_tag(): bot.follow_users(bot.get_hashtag_users(get_random(random_hashtag_file))) def c_tag(): bot.comment_hashtag(get_random(random_hashtag_file)) def direct_messages(): bot.send_messages(direct_advertise, get_random(bot.get_hashtag_users(get_random(hashtag_advertise)))) def run_threaded(job_fn): job_thread = threading.Thread(target=job_fn) job_thread.start() def test(): Thread(target=direct_messages).start() 1st bug Thread(target=l_tag).start() 2nd bug Thread(target=l_followers).start() ok Thread(target=f_followers).start() ok Thread(target=f_tag).start() ok Thread(target=c_tag).start() 3rd bug print("bot started") while True: schedule.run_pending() time.sleep(1)
bot.login() test()
bot = Bot() followers = bot.get_user_followers(bot.user_id)