subzeroid / aiograpi

šŸ”„ Asynchronous Python library for Instagram Private API 2024
https://hikerapi.com/p/KhMxYMSn
MIT License
71 stars 10 forks source link

BUG while using user_followers() code expample: followers = await cl.user_followers(cl.user_id) #59

Open gavinchris37 opened 3 weeks ago

gavinchris37 commented 3 weeks ago

Try HikerAPI SaaS with a free trial https://hikerapi.com/p/KhMxYMSn

Describe the bug followers = await cl.user_followers(cl.user_id) when using the above function im getting the below error message in the output

To Reproduce followers = await cl.user_followers(cl.user_id)

Traceback Show your full traceback so that it is clear where exactly the error occurred.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Output Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/username/?__a=1&__d=dis) >>> 'NoneType' object has no attribute 'cookies' Traceback (most recent call last): File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\user.py", line 891, in user_followers users = await self.user_followers_gql(user_id, amount) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\user.py", line 780, in user_followers_gql items, end_cursor = await self.user_followers_gql_chunk( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\user.py", line 732, in user_followers_gql_chunk self.inject_sessionid_to_public() File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\mixins\auth.py", line 851, in inject_sessionid_to_public self.graphql.set_cookies(cookie) File "D:\Projects\Python\raph\venv\Lib\site-packages\aiograpi\reqwests.py", line 87, in set_cookies self._client.cookies.set(k, v) ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'cookies'

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Paintitai commented 3 weeks ago

the same bug, any idea?

Paintitai commented 3 weeks ago

@proxies.setter def proxies(self, p): self._proxies = p self._set_client()

looks like setter never call