Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

After filtration 0 medias left. #701

Closed
5 of 7 tasks
smokefx opened this issue Nov 10, 2018 · 34 comments
Closed
5 of 7 tasks

After filtration 0 medias left. #701

smokefx opened this issue Nov 10, 2018 · 34 comments
Labels

Comments

@smokefx
Copy link

smokefx commented Nov 10, 2018

Please follow the guide below

  • Issues submitted without this template format will be ignored.
  • You will be asked some questions and requested to provide some information, please read them carefully and answer completely.
  • Put an x into all the boxes [ ] relevant to your issue (like so [x]).
  • Use the Preview tab to see how your issue will actually look like.

Before submitting an issue, make sure you have:

  • Updated to the latest version
  • Read the README and docs
  • Searched the bugtracker for similar issues including closed ones

Purpose of your issue?

  • 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:
smoke@debian:~$ python -V
Python 2.7.13

Code:

# Example code that will produce the error reported
from instabot import Bot

bot = Bot()
bot.login(username="user", password="pass")
t = bot.get_timeline_medias()

Error/Debug Log:

2018-11-10 14:42:40,476 - INFO - Received 10 medias.
2018-11-10 14:42:40,476 - INFO - After filtration 0 medias left.

Describe your issue

First off, thank you everyone that has contributed to the development of this bot. I've been using it for the past year with no problems auto liking my timeline feed but after updating the bot recently when I retrieve my timeline media it filters everything out and returns with 0 medias. I've checked all the settings: max_likes_to_like, min_likes_to_like, etc. and looked thru the bot_filter.py, bot_get.py, and bot_likes.py but could not find a solution.

@smokefx
Copy link
Author

smokefx commented Nov 11, 2018

I've actually disabled the filtration and the bot still doesnt like any media ... not too sure what is causing it.

@dealerboost
Copy link

Same here

@davidrsantos
Copy link

@ wolduby

@elabdel26
Copy link

Hello, I also observed this problem. But after taking a look to bot code there are a lot of filter to play with in the aim to do what we need. The default values are not always suiting the needs

First of all you can test with bot.filter_users = False

Then try the likes filters :
bot.max_likes_to_like=10000 (default = 100)
bot.min_likes_to_like=0 (default = 20)

The default values mean that all posts that have more than 100 likes or less than 20 won't be liked.

Hope this can help

@smokefx
Copy link
Author

smokefx commented Nov 14, 2018

yes, ive tried changing the filters, it still filters the media to 0 @elabdel26

@dealerboost
Copy link

Same again. I changed all the settings and still 0 medias left.

@dealerboost
Copy link

Maybe someone share his settings so we can test it out ?

@diorox
Copy link

diorox commented Nov 16, 2018

Same problem

@alainpoeta
Copy link

alainpoeta commented Nov 18, 2018

I changed min_likes_to_like=0
and filter_business_accounts=False

in bot.py and solved the same problem

@dealerboost
Copy link

I changed min_likes_to_like=0
and filter_business_accounts=False

in bot.py and solved the same problem

Worked here as well. Thank you bud

@ghost
Copy link

ghost commented Nov 18, 2018

This solution is not working for me. I still get this display:

INFO - Received 10 medias.
INFO - After filtration 0 medias left.
INFO - Nothing to like.

@dealerboost
Copy link

dealerboost commented Nov 18, 2018

here are my settings if iti can help:

1000
1000
350
350
100
10000
False
3000000
10
40000000
10
10
2
3
2000
1000
10
10
30
30
60
None

@ghost
Copy link

ghost commented Nov 18, 2018

here are my settings if iti can help:

1000 1000 350 350 100 10000 False 3000000 10 40000000 10 10 2 3 2000 1000 10 10 30 30 60 None

Thank you but it's not working. I think it's not a problem of settings but I'm completely stacked. Thank you anyway.

@smokefx
Copy link
Author

smokefx commented Nov 18, 2018

I changed min_likes_to_like=0
and filter_business_accounts=False

in bot.py and solved the same problem

didn't work for me. i changed all the filter settings to false and it still didnt work.

@smokefx
Copy link
Author

smokefx commented Nov 18, 2018

I changed min_likes_to_like=0
and filter_business_accounts=False
in bot.py and solved the same problem

Worked here as well. Thank you bud

did you change something else? because those 2 settings didnt work for me.

@dealerboost
Copy link

I changed min_likes_to_like=0
and filter_business_accounts=False
in bot.py and solved the same problem

Worked here as well. Thank you bud

did you change something else? because those 2 settings didnt work for me.

Nope. Here the settings (pretty much default)

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=1000,
max_unlikes_per_day=1000,
max_follows_per_day=350,
max_unfollows_per_day=350,
max_comments_per_day=100,
max_blocks_per_day=100,
max_unblocks_per_day=100,
max_likes_to_like=100,
min_likes_to_like=0,
max_messages_per_day=300,
filter_users=True,
filter_private_users=True,
filter_users_without_profile_photo=True,
filter_previously_followed=False,
filter_business_accounts=False,
filter_verified_accounts=True,
max_followers_to_follow=2000,
min_followers_to_follow=10,
max_following_to_follow=2000,
min_following_to_follow=10,
max_followers_to_following_ratio=10,
max_following_to_followers_ratio=2,
min_media_count_to_follow=3,
max_following_to_block=2000,
like_delay=10,
unlike_delay=10,
follow_delay=30,
unfollow_delay=30,
comment_delay=60,
block_delay=30,
unblock_delay=30,
message_delay=60,
stop_words=('shop', 'store', 'free'),
blacklist_hashtags=['#shop', '#store', '#free'],
verbosity=True,
device=None

@smokefx
Copy link
Author

smokefx commented Nov 19, 2018

I changed min_likes_to_like=0
and filter_business_accounts=False
in bot.py and solved the same problem

Worked here as well. Thank you bud

did you change something else? because those 2 settings didnt work for me.

Nope. Here the settings (pretty much default)

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=1000,
max_unlikes_per_day=1000,
max_follows_per_day=350,
max_unfollows_per_day=350,
max_comments_per_day=100,
max_blocks_per_day=100,
max_unblocks_per_day=100,
max_likes_to_like=100,
min_likes_to_like=0,
max_messages_per_day=300,
filter_users=True,
filter_private_users=True,
filter_users_without_profile_photo=True,
filter_previously_followed=False,
filter_business_accounts=False,
filter_verified_accounts=True,
max_followers_to_follow=2000,
min_followers_to_follow=10,
max_following_to_follow=2000,
min_following_to_follow=10,
max_followers_to_following_ratio=10,
max_following_to_followers_ratio=2,
min_media_count_to_follow=3,
max_following_to_block=2000,
like_delay=10,
unlike_delay=10,
follow_delay=30,
unfollow_delay=30,
comment_delay=60,
block_delay=30,
unblock_delay=30,
message_delay=60,
stop_words=('shop', 'store', 'free'),
blacklist_hashtags=['#shop', '#store', '#free'],
verbosity=True,
device=None

how strange mine still doesnt work... hmmm

@ghost
Copy link

ghost commented Nov 19, 2018

Same here. Changing these parameters the behaviour of the "liker functions" changes, as expected. Except the behaviour of the feed likers.

@dpereirasilva
Copy link

Olá eu sou brasileiro e não sei escrever muito bem ingles tão a solução é a seguinte:
Modifique a função de nome _filter_medias_not_likes do arquivo bot_filter.py na linha 23.
Cole isto:
def _filter_medias_not_liked(media_items): not_liked_medias = [] for media in media_items: try: media = next(v for k,v in media.items() if 'media_or_ad' in k) if 'has_liked' in media and not media['has_liked']: not_liked_medias.append(media) except StopIteration as identifier: try: hasdliked = next(v for k,v in media.items() if 'has_liked' in k) if not hasdliked: not_liked_medias.append(media) except StopIteration as identifier: print('ops - has_liked') return not_liked_medias

Na execução do comando de realizar like no feed vc deverar setar a seguinte instrução:
bot.min_likes_to_like=0 bot.max_likes_to_like=500 bot.filter_users=False

Obrigado pessoal que desenvolve essa solução tmj
Bom, agora eu vou dormir

@smokefx
Copy link
Author

smokefx commented Nov 20, 2018

Hello, I'm Brazilian and I do not know how to write very well English so the solution is as follows:
Modify the _filter_medias_not_likes name function of the bot_filter.py file at line 23.
Paste this:
def _filter_medias_not_liked(media_items): not_liked_medias = [] for media in media_items: try: media = next(v for k,v in media.items() if 'media_or_ad' in k) if 'has_liked' in media and not media['has_liked']: not_liked_medias.append(media) except StopIteration as identifier: try: hasdliked = next(v for k,v in media.items() if 'has_liked' in k) if not hasdliked: not_liked_medias.append(media) except StopIteration as identifier: print('ops - has_liked') return not_liked_medias

In executing the command like perform in the feed vc should be the following statement:
bot.min_likes_to_like=0 bot.max_likes_to_like=500 bot.filter_users=False

Thank you guys who develop this solution tmj
Good, now I go to sleep

thank you!, i just added the code but it still is not working... here is what i changed for the function _filter_medias_not_liked()

def _filter_medias_not_liked(media_items):
    not_liked_medias = []
    for media in media_items:
        try:
            media = next(v for k,v in media.items()
                    if 'has_liked' in k)
            if 'has_liked' in media and not media['has_liked']:
                not_liked_medias.append(media)
        except StopIteration as identifier:
            try:
                hasdliked = next(v for k,v in media.items()
                        if 'has_liked' in k)
                if not hasdliked:
                    not_liked_medias.append(media)
            except StopIteration as identifier: print('ops - has_liked')
    return not_liked_medias

@dpereirasilva
Copy link

dpereirasilva commented Nov 20, 2018

Você não pode esquecer de inserir:

bot.min_likes_to_like=0
bot.max_likes_to_like=500
bot.filter_users=False
bot.like_timeline() <-
Dai tudo da certo \o/

@smokefx
Copy link
Author

smokefx commented Nov 20, 2018

You can not forget to insert:

bot.min_likes_to_like=0
bot.max_likes_to_like=500
bot.filter_users=False
bot.like_timeline() <-
Dai tudo da certo \o/

yes i did add this but still no luck :(

@WeidnersApps
Copy link

I have the same problem and tryed it all, but i also didn't get it fixed

@ghost
Copy link

ghost commented Nov 21, 2018

Same problem here, it's not working.

@MrMdR
Copy link

MrMdR commented Nov 21, 2018

Hi, I got the same problem. I can't seem to find the solution.
Recieved 7 medias
after filtration 0 medias left
going to comment on 0 medias

@MrMdR
Copy link

MrMdR commented Nov 21, 2018

It seems that it has to do with commenting/linking on your feed/timeline. When liking media from followers or with a hashtag it appears to work.

The function "bot.get_timeline_medias()" is the problem I think?

Anyone experience the same?

@smokefx
Copy link
Author

smokefx commented Nov 21, 2018

It seems that it has to do with commenting/linking on your feed/timeline. When liking media from followers or with a hashtag it appears to work.

The function "bot.get_timeline_medias()" is the problem I think?

Anyone experience the same?

it does seem like it works a little bit not but fully working either for me. it filters it off 1 by 1 when i use the examples/like_hashtags.py which i dont think was its normal operation before it broke. its definately something to do with a filtering function or a get function.

@markford1
Copy link

Any progress with this issue? I’m currently having the same problem :(

@sudoguy
Copy link
Collaborator

sudoguy commented Nov 30, 2018

Guys, this bug fixed bf82ec5
But update only in master branch, not in pip yet

@lizergin88
Copy link

Guys, this bug fixed bf82ec5
But update only in master branch, not in pip yet

Didn't help. Still 0 medias

@smokefx
Copy link
Author

smokefx commented Dec 3, 2018

Guys, this bug fixed bf82ec5
But update only in master branch, not in pip yet

when i first loaded it seems working but i keep getting filters out again after running the ultimate.py scripe for a couple days and its returning 0 medias again..

@lizergin88
Copy link

lizergin88 commented Dec 3, 2018

Who knows how to disable this timeline filter at all? Tried bot.filter_users=False, filter_private_users=False, filter_users_without_profile_photo=False
didn't have any effect, still 0 medias to like.

@stale
Copy link

stale bot commented Feb 2, 2019

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.

@MrMdR
Copy link

MrMdR commented Apr 6, 2020

Hi, I still got this issue.
Does anyone understand why this is happening? Seems like black magic to me...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests