jarrodnorwell / InstaPy2

Instagram automation tool for farming comments, follows and likes, written in Python
GNU General Public License v3.0
49 stars 9 forks source link

Issue when trying to like by hashtags #41

Closed itsGarrin closed 9 months ago

itsGarrin commented 9 months ago

Traceback (most recent call last): File "/Users/PycharmProjects/InstaPy/ivy.py", line 34, in session.like.hashtags(amount=10, iterable=["mentalhealth"]) File "/Users/PycharmProjects/InstaPy/venv12/lib/python3.12/site-packages/instapy2/utilities/like.py", line 34, in hashtags posts = hashtags_medias(name=hashtag, amount=amount) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/PycharmProjects/InstaPy/venv12/lib/python3.12/site-packages/instagrapi/mixins/hashtag.py", line 444, in hashtag_medias_recent medias = self.hashtag_medias_recent_a1(name, amount) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/PycharmProjects/InstaPy/venv12/lib/python3.12/site-packages/instagrapi/mixins/hashtag.py", line 407, in hashtag_medias_recent_a1 return self.hashtag_medias_a1(name, amount, tab_key="recent") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/PycharmProjects/InstaPy/venv12/lib/python3.12/site-packages/instagrapi/mixins/hashtag.py", line 222, in hashtag_mediasa1 medias, = self.hashtag_medias_a1_chunk(name, amount, tab_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/PycharmProjects/InstaPy/venv12/lib/python3.12/site-packages/instagrapi/mixins/hashtag.py", line 195, in hashtag_medias_a1_chunk if not result["more_available"]:


KeyError: 'more_available'

Seems like an issue with the api calls. Let me know if you need more information. Thanks!
jarrodnorwell commented 9 months ago

Hey @itsGarrin, did you install InstaPy2 through GitHub or PyPI?

itsGarrin commented 9 months ago

I first tried through PyPi, then overwrote all the files in site packages via GitHub

jarrodnorwell commented 9 months ago

Looking at what you sent again it actually looks like an Instagrapi issue so I'll probably fix that for them assuming it's not done by the time I get to it

itsGarrin commented 9 months ago

Perfect! Let me know when you get to it.

jarrodnorwell commented 9 months ago

@itsGarrin fixed locally, will do a PR for them and see what they think

jarrodnorwell commented 9 months ago

@itsGarrin they've merged my PR with the fix, if you update Instagrapi from GitHub (or maybe PyPI) it should fix those issues: pip install git+https://github.com/subzeroid/instagrapi

itsGarrin commented 9 months ago

Perfect! Tysm for the help man