[x] Searched the bugtracker for similar issues including closed ones
Purpose of your issue?
[x] Bug report (encountered problems/errors)
[ ] Feature request (request for a new functionality)
[ ] Question
[ ] Other
The following sections requests more details for particular types of issues, you can remove any section (the contents between the triple ---) not applicable to your issue.
For a bug report, you must include the Python version used, code that will reproduce the error, and the error log/traceback.
Paste the output of python -V here:
Code:
import schedule
import time
import sys
import os
import random
from tqdm import tqdm
import threading #->added to make multithreadening possible -> see fn run_threaded
sys.path.append(os.path.join(sys.path[0],'../../'))
from instabot import Bot
bot = Bot(
filter_users=False,
#--- proxy ---
proxy=None,
#--- delays ---
like_delay=20,
follow_delay=50,
unfollow_delay=60,
comment_delay=60,
#--- max ---
max_likes_per_day=1000,
max_unlikes_per_day=300,
max_follows_per_day=250,
max_unfollows_per_day=350,
#max_likes_to_like=100,
#max_followers_to_follow=2000,
min_followers_to_follow=50,
max_following_to_follow=5000,
#min_following_to_follow=10,
#max_followers_to_following_ratio=10,
#max_following_to_followers_ratio=2,
max_following_to_block=5000,
min_media_count_to_follow=20,
#--- files ---
comments_file="comments.txt",
blacklist="blacklist.txt",
whitelist="whitelist.txt",
)
bot.login(username="aaa", password="aaa")
bot.logger.info("ULTIMATE script. 24hours save")
#--- FILE TXT ---
random_hashtag_file = bot.read_list_from_file("hashtag_database.txt")
random_user_file = bot.read_list_from_file("username_database.txt")
comments_file_name = "comments.txt"
#fn to return random value for separate jobs
def get_random(from_list):
_random=random.choice(from_list)
print("Random from ultimate.py script is chosen: \n" + _random + "\n")
return _random
#--- JOBS ---
def job1(): bot.like_hashtag(get_random(random_hashtag_file), amount=int(20))
def job2(): bot.follow_followers(get_random(random_user_file), nfollows=40)
def job3(): bot.unfollow_non_followers(n_to_unfollows=200)
def job4(): bot.comment_medias(bot.get_timeline_medias())
def job6(): bot.follow_users(da_seguire)
def job7(): bot.like_timeline()
def job8(): bot.comment_hashtag(get_random(random_hashtag_file), amount=10)
def roundlike(like_delay=10):
like_users_list = bot.read_list_from_file("like_users.txt")
print("--- ROUND START ---")
print("Like last post of users in list:", like_users_list)
tasks_list = []
for item in like_users_list:
tasks_list.append((bot.like_user, {'user_id': item, 'amount': 1, 'filtration':False}))
for func, arg in tasks_list:
func(**arg)
# function to make threads -> details here http://bit.ly/faq_schedule
def run_threaded(job_fn):
job_thread=threading.Thread(target=job_fn)
job_thread.start()
#--- TIMELINE ---
schedule.every(1).days.at("07:00").do(run_threaded, job7)
schedule.every(1).days.at("07:30").do(run_threaded, job7)
schedule.every(1).days.at("08:00").do(run_threaded, job7)
schedule.every(1).days.at("08:05").do(run_threaded, job1)
schedule.every(1).days.at("08:15").do(run_threaded, job1)
schedule.every(1).days.at("08:25").do(run_threaded, job1)
schedule.every(1).days.at("08:35").do(run_threaded, job1)
schedule.every(1).days.at("08:45").do(run_threaded, job1)
schedule.every(1).days.at("09:00").do(run_threaded, job7)
schedule.every(1).days.at("09:05").do(run_threaded, job2)
schedule.every(1).days.at("09:45").do(run_threaded, job8)
while True:
schedule.run_pending()
time.sleep(1)
Error/Debug Log:
Describe your issue
Hello,
I have configured the ultimate_schedule code as you can see below.
The timeline section is repeated several times during the day in the same way at different times (I have included only a part below).
After starting the script, sometimes the errors you see below appear.
I do not understand what is due.
I await your help.
Thank you.
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.
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like so [x]).Before submitting an issue, make sure you have:
Purpose of your issue?
The following sections requests more details for particular types of issues, you can remove any section (the contents between the triple ---) not applicable to your issue.
For a bug report, you must include the Python version used, code that will reproduce the error, and the error log/traceback.
Paste the output of
python -V
here:Code:
Error/Debug Log:
Describe your issue
Hello, I have configured the ultimate_schedule code as you can see below. The timeline section is repeated several times during the day in the same way at different times (I have included only a part below). After starting the script, sometimes the errors you see below appear. I do not understand what is due. I await your help. Thank you.