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

Comment on Recent media #335

Closed abprince closed 6 years ago

abprince commented 6 years ago

is there any possible way bot will like and comment on last recent media and skip to next user in the list and so on . Now the likes and comment on all most possible post ( sometime 18 sometime 12 post ) . Is there any way to handle this issue

harisprananda commented 6 years ago

For limit media liker may you can read this one: https://github.com/instagrambot/instabot/issues/306

abprince commented 6 years ago

But its only for like . i wanted to limit the comment on recent post say just comment on 1 post

insightadam commented 6 years ago

_filter_medias_not_commented had no usages, but when I tried to use it by providing is_comment=True to the filter_medias method, it showed that _filter_medias_not_commented has an exception.

File "/instabot/instabot/bot/bot_filter.py", line 56, in _filter_medias_not_commented my_comments = [comment for comment in media['comments'] if comment['user_id'] == self.user_id] KeyError: 'comments'

That key really doesn't exist in the media's dictionary, although it does have the count of comments>0

Instead of using that function, you are using bot_comment.py/is_commented method which is also buggy. for it to work you must cast the user_id as string def is_commented(self, media_id): return str(self.user_id) in self.get_media_commenters(media_id)

stale[bot] commented 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.