Error fetching direct messages
Become a 10x Instagrammer and Escape Brainrot with Instagram CLI
Brought to you by:
jetc
Originally created by: supreme-gg-gg
Originally owned by: endernoke
Describe the bug
When starting the chat it needs to load the direct messages using the API. However, a bunch of error were received which I suspect is slowing down the loading process significantly. Please investigate and fix.
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/spacy_astro/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/spacy_astro/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/spacy_astro/?__a=1&__d=dis) >>>
Status 404: Endpoint /v1/users/spacy_astro/usernameinfo/ does not exist
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/instaducing_mike_merle/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/instaducing_mike_merle/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/instaducing_mike_merle/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/enough.reels/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/enough.reels/?__a=1&__d=dis) >>>
Status 201: JSONDecodeError in public_request (url=https://www.instagram.com/enough.reels/?__a=1&__d=dis) >>>
To Reproduce
Steps to reproduce the behavior:
python3 instagram.cli chat and start chatExpected behavior
Expected to load much faster without any error, error logs should be hidden from client.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Originally posted by: endernoke
Fixed in commit e1fc38f
Now DMs should load significantly faster without
JSONDecodeError in public requesterrorsThe cause was that I made unnecessary instagrapi requests to get chat participant info from user id, which is already returned inside DirectThread data.
Ticket changed by: endernoke