igbot
igbot copied to clipboard
[BUG/QUESTION] Like/comment timeline, the filtration issue. How and why does it filter?
Before submitting an issue, make sure you have:
- [x] Updated to the lastest version
- [x] Read the README
- [x] Searched the bugtracker for similar issues including closed ones
- [x] Reviewed the sample code in tests and examples
Describe your Question/Issue:
Hello,
I have been trying to use instabot for 2 years now but it seems I can not solve/wrap my head around one thing.
After filtration 0 medias left.
Weather I use bot.comment_medias()
or bot.like_timeline()
or bot.like_medias(bot.get_timeline_medias())
or even
timeline_medias = bot.get_timeline_medias() for media in tqdm(timeline_medias, desc="timeline"): bot.like_user(bot.get_media_owner(media))
They all give 0 results. But not always. Something's it likes 1, or comments 1. Very rarely tho.
First I thought bot.like_timeline()
was corrupted, therefore I gathered 2 other methods of liking timeline feed posts. They are probably all the same because the results are also always the same: 0.
For a long time, I thought that the filtration was something like βalready viewedβ. That Instagram/bot keep track of what post Iβve already seen on my timeline and filter those out. So I did not open my Instagram for 3 days while my friends were posting photos.
I ran the attached script and⦠After filtration 0 medias left.
.
Some additional information:
- The media to like are of my friends, I follow them and they follow me.
- They post regularly. Every day there are a few new posts.
- The medias have already a few likes.
- Iβm running windows 10 and python 3.7
- As said on the gitup landing page there are a lot of filters built-in instabot. Iβve tried to play with these without success. https://github.com/instagrambot/instabot/blob/master/instabot/bot/bot.py#L134
My installation & usage process is as follows:
- I did a full install of python
- I opened CMD.exe and enter
pip install -U instabot
(as recently as yesterday) - Download the master ZIP file (as recently as yesterday) and unzip it in C:\Users\mmark\Downloads\
- I enter in the command prompt cd downloads\instabot-master\examples
- I enter the command like_timeline_feed.py or the script below.
Iβve seen more people having raised this issue. These are similar issues I came across but could not solve my problem: https://github.com/instagrambot/instabot/issues/1254 https://github.com/instagrambot/instabot/issues/1240 https://github.com/instagrambot/instabot/issues/1283 https://github.com/instagrambot/instabot/issues/1219 https://github.com/instagrambot/instabot/issues/701 https://github.com/instagrambot/instabot/issues/297 https://github.com/instagrambot/instabot/issues/723 https://github.com/instagrambot/instabot/issues/724
It seems there is a lot of confusion about this issue. People, myself included, do not understand what the nature is of this issue people are having. I was hoping that by giving one elaborate post someone could point me in the right direction / see what I did wrong.
- Maybe someone could explain to me why this is happening.
- Perhaps the βerrorβ messaging could be less arbitrary?
- Is there a way to turn filtration 100% off and just take the last 10 un-liked media from my timeline? That would be the most logical I would say.
Thank you for your help!
Code you are using:
import instabot
import os
import sys
from tqdm import tqdm
sys.path.append(os.path.join(sys.path[0], "../"))
from instabot import Bot # noqa: E402
bot = Bot(filter_users=False, filter_previously_followed=False, comments_file="comments.txt", max_follows_per_day=100, follow_delay=30)
if not os.path.exists("comments.txt"):
print("Can't find '%s' file." % ". comments.txt")
exit()
bot.login(username="USER", password="PSWRD")
while True:
bot.logger.info("--Comment om media--")
bot.comment_medias(bot.get_timeline_medias())
bot.logger.info("--option 1--")
timeline_medias = bot.get_timeline_medias()
for media in tqdm(timeline_medias, desc="timeline"):
bot.like_user(bot.get_media_owner(media))
bot.logger.info("--option 2--")
bot.like_medias(bot.get_timeline_medias())
bot.logger.info("- option 3--")
bot.like_timeline()
Error/Debug Log:
2020-03-09 12:51:55,473 - INFO - Received 6 medias.
2020-03-09 12:51:55,473 - INFO - After filtration 0 medias left.
2020-03-09 12:51:55,473 - INFO - Nothing to like.
Hey @MrMdR,
We did a quick check and this issue looks very darn similar to
- #1353 - [QUESTION] how are the parameters of reply_to_media_comments.py defined?
- #1343 - [QUESTION] Can't login, Instagram keep asking me if this was me and every time I click yes still won't login
- #1341 - Pics directory in autopost deletes files
This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:
If not, the maintainers will get to this issue shortly.
Cheers, Your Friendly Neighborhood ProBot
i have only recently started working with the bot, but i would guess that due to the standard filters set in the bot's construct your media will be filtered
this code can be found under \instabot\instabot\bot\bot.py
class Bot(object):
def __init__(
self,
base_path=current_path + "/config/",
whitelist_file="whitelist.txt",
blacklist_file="blacklist.txt",
comments_file="comments.txt",
followed_file="followed.txt",
unfollowed_file="unfollowed.txt",
skipped_file="skipped.txt",
friends_file="friends.txt",
proxy=None,
max_likes_per_day=random.randint(50, 100),
max_unlikes_per_day=random.randint(50, 100),
max_follows_per_day=random.randint(50, 100),
max_unfollows_per_day=random.randint(50, 100),
max_comments_per_day=random.randint(50, 100),
max_blocks_per_day=random.randint(50, 100),
max_unblocks_per_day=random.randint(50, 100),
max_likes_to_like=random.randint(50, 100),
min_likes_to_like=random.randint(50, 100),
max_messages_per_day=random.randint(50, 100),
filter_users=False,
filter_private_users=False,
filter_users_without_profile_photo=False,
filter_previously_followed=False,
filter_business_accounts=False,
filter_verified_accounts=False,
max_followers_to_follow=5000,
min_followers_to_follow=10,
max_following_to_follow=2000,
min_following_to_follow=10,
max_followers_to_following_ratio=15,
max_following_to_followers_ratio=15,
min_media_count_to_follow=3,
max_following_to_block=2000,
like_delay=random.randint(300, 600),
unlike_delay=random.randint(300, 600),
follow_delay=random.randint(300, 600),
unfollow_delay=random.randint(300, 600),
comment_delay=random.randint(300, 600),
block_delay=random.randint(300, 600),
unblock_delay=random.randint(300, 600),
message_delay=random.randint(300, 600),
stop_words=("shop", "store", "free"),
blacklist_hashtags=["#shop", "#store", "#free"],
blocked_actions_protection=True,
blocked_actions_sleep=True,
blocked_actions_sleep_delay=random.randint(600, 1200),
verbosity=True
I found a workaround for this issue.
On instabot/instabot/bot/bot_get.py at line 75. def get_timeline_medias(self, filtration=True)
. set filtration=False
.
I tried it with examples/infinity_feedliker.py
.
I found a workaround for this issue. On instabot/instabot/bot/bot_get.py at line 75.
def get_timeline_medias(self, filtration=True)
. setfiltration=False
. I tried it withexamples/infinity_feedliker.py
.
I attempted that workaround on examples/comment/comment_your_feed
and it is not currently working.
Setting filtration=False
on line 75 continually throws:
Received x medias.
After filtration 0 medias left.
Going to comment 0 medias.
Did this fix the issue for you because I have not had any success and can't seem to grasp the root cause of this bug?
Hi. I'm sorry my usecase was just liking. So I didnt even read about comment in the issue title.
It works with infinity_feedliker.py
.
Checkout comment_medias
method at line 91 in /instabot/bot/bot_comment.py
. Try removing:
if not self.check_media(media):
continue
check_media
seems to return always false (making comment to be skiped on that media). Except in one case.
if self.filter_medias(medias, quiet=True):
return check_user(self, self.get_media_owner(media_id))
and
filter_medias(self, media_items, filtration=True, quiet=False, is_comment=False)
has filtration true by default. So again filtration issues I guess.
(I didnt try it. And won't try it because I dont feel like spaming random 'heys' since I use my personal Instagram account π). Hope it helps
i have only recently started working with the bot, but i would guess that due to the standard filters set in the bot's construct your media will be filtered
this code can be found under \instabot\instabot\bot\bot.py
class Bot(object): def __init__( self, base_path=current_path + "/config/", whitelist_file="whitelist.txt", ....
Hi, Thanks for your reply. Yes, I know about those filters. Setting them to False does not seem to make the difference. What is your experience so far?
I found a workaround for this issue. On instabot/instabot/bot/bot_get.py at line 75.
def get_timeline_medias(self, filtration=True)
. setfiltration=False
. I tried it withexamples/infinity_feedliker.py
.
Hi, Thanks for you suggestion!
I tried your suggestion. However, I still get the following in the console:
2020-04-06 22:23:49,115 - INFO - Liking timeline feed: 2020-04-06 22:23:50,222 - INFO - Received 8 medias. 2020-04-06 22:23:50,222 - INFO - After filtration 0 medias left. 2020-04-06 22:23:50,228 - INFO - Nothing to like. 2020-04-06 22:23:50,233 - INFO - Total requests: 32
I used like_timeline_feed.py. As you can see there are 8 media, but for some mysterious reason, non are liked.
Does anyone know what the reason is for this? Thanks in advance!
if had a look at the code because i had the same problem, i had success by changing line 75 in
C:\Users\username\AppData\Local\Programs\Python\Python37\Lib\site-packages\instabot-0.117.0-py3.7.egg\instabot\bot
from
def get_timeline_medias(self, filtration=True):
to
def get_timeline_medias(self, filtration=False):
this changed my console output to
2020-04-12 20:17:54,898 - INFO - Not yet logged in starting: PRE-LOGIN FLOW!
2020-04-12 20:17:57,492 - INFO - Logged-in successfully as fucktdup!
2020-04-12 20:17:57,492 - INFO - LOGIN FLOW! Just logged-in: True
2020-04-12 20:18:10,681 - INFO - Going to comment 8 medias.
0%| | 0/8 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\Chris\Desktop\Instagram\Instabot-master (not working)\instabot-master\examples\comment\comment_your_feed.py", line 34, in
C:\Users\Chris\Desktop\Instagram\Instabot-master (not working)\instabot-master\examples\comment>
as you can see it wants to comment 8 posts now, but i get some other errors rn. I will add a solution to those asap when i find one.
ps and yes, i am to dumb to format my output in rhe right way:D
--------------------------------UPDATE-----------------------------------
for everyone who uses the standart font from notrfpad unlike me, my solution works without any problems, i checked it rn.
for everyone else, who uses some fancy font shit like me example: π'π π π€ππππ ππππ π‘πππ πππ ππ₯ π¨π π¦ππ ππ ππππ ππ πͺπ π¦ πππππ ππ π π¦π₯ :) this wont work, because the bot can not reat this text format. I am currently working on finding out where exactly t have to put in and encoder and get it to work. I'll update you guys.