instagrapi
instagrapi copied to clipboard
Can we reach users with Instagram suggestions?
I want to see and follow my suggestion list. Can I see the suggestion list like the home page of the mobile app?
Like this:
I worked on this last week. There is currently a public request method 'profile_related_info' in the library. However, Instagram is no longer responding to this public request. Instead I found an "fbsearch" request with the fbsearch/accounts_recs/ endpoint from web browser network activities.
I added the following method to fbsearch.py. It returns 80 suggested profiles for each profile.
def fbsearch_suggested_profiles(self, user_id: str) -> List[UserShort]:
params = {
"target_user_id": user_id,
"include_friendship_status": "true",
}
result = self.private_request("fbsearch/accounts_recs/", params=params)
return result["users"]
@abdullahbektass Thank you, It really works. I've create a PR, so it will be easier for other to use if merged.