You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
When a sessionid is passed to the Profile.scrape() function, the scraped profile contains a wrong biography.
Instead of getting the biography of the Profile asked, it returns the biography of the account associated to the sessionid (the "viewier user").
The fix maps the key "biography" to "user_biography". This fix is similar to the "profile_pic_url" and "user_profile_pic_url" keys. This is needed beacuse Instagram returns different keys when logged in using a sessionid cookie.
Closeschris-greening#88
Describe the bug
The biography returned is always that of the login user.
To Reproduce
Script that gives the wrong output:
from instascrape import *
SESSIONID = ' xxx '
headers = {"user-agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36 Edg/87.0.664.57",
"cookie": f"sessionid={SESSIONID};"}
user = Profile("anna")
user.scrape(headers=headers)
print(user.username, " bio ", user.biography)
user = Profile("andreas")
user.scrape(headers=headers)
print(user.username, " bio ", user.biography)
output:
anna bio Login users text
andreas bio Login users text
Expected behavior
It should write out the bio of the individual users.
Desktop (please complete the following information):
Thank you for a nice software.
The text was updated successfully, but these errors were encountered: