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

Ultimate.py error when invoking bot.like_timeline #614

Closed chicco785 closed 5 years ago

chicco785 commented 6 years ago

Please follow the guide below


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: 3.6

Code:

def like_timeline():
    bot.logger.info("like_timeline")
    bot.like_timeline(amount=300 // 24)

Error/Debug Log:

2018-08-13 15:30:10,494 - INFO - Liking timeline feed:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "conf/ultimate.py", line 51, in like_timeline
    bot.like_timeline(amount=300 // 24)
  File "/opt/app/conf/../instabot/bot/bot.py", line 407, in like_timeline
    return like_timeline(self, amount)
  File "/opt/app/conf/../instabot/bot/bot_like.py", line 59, in like_timeline
    medias = self.get_timeline_medias()[:amount]
  File "/opt/app/conf/../instabot/bot/bot.py", line 300, in get_timeline_medias
    return get_timeline_medias(self)
  File "/opt/app/conf/../instabot/bot/bot_get.py", line 46, in get_timeline_medias
    return self.filter_medias(self.api.last_json["items"], filtration)
KeyError: 'items'

Describe your issue

Not sure if I am doing something wrong :) but I suppose no, since there not need for any configuration for this API call

chicco785 commented 6 years ago

looking at the code is suspect that 'feed_items' is correct rather than 'items'

A1exLemesios commented 6 years ago

Having the same issue, the answer of @chicco785 is correct , though i can't edit the source code because is placed in an .egg file . Any ideas how to fix it ?

ghost commented 6 years ago

still doesnt work @chicco785

putuariepra commented 6 years ago

Has anyone managed to fix this? I have changed items to feed_items in bot_get.py (line 46, function get_timeline_medias). The error is gone but the bot always shows "After filtration 0 medias left. Nothing to like.". In fact, there are many medias that have not been liked when I open my timeline in mobile app

ghost commented 6 years ago

no one has managed to fix this and its very disappointing @putuariepra

A1exLemesios commented 6 years ago

The media retrieved from the specific api has media_or_ad as main object . After the media are retrieved they are filtered based on their media object which doesn't exist . In bot.filter add a check for media_or_ad in the object and the filtering will work just fine

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