-
Notifications
You must be signed in to change notification settings - Fork 33
post.caption is not returning right value #21
Comments
@1999gauravgupta, you can use >>> from instagramy import InstagramPost
>>> post = InstagramPost('CNrtoeOp_Et', sessionid=sessionid)
>>> post.text
"It's been a long journey and we have nothing else filling our hearts today except gratitude.\nGratitude for the support and love and patience that everyone in the entire small business ecosystem has showered on us in the last few years. Nothing more to be said , just deep felt Thanks."
Thank You, |
@1999gauravgupta In the first issue, check your session-id once again it may be changed by Instagram. >>> account = InstagramUser(ig_name, sessionid=SESSION_ID)
>>> posts = account.posts
>>> post_id = posts[0].shortcode
>>> post = InstagramPost(post_id, sessionid=SESSION_ID)
>>> post.text Provide the correct session id |
No, the session-id was correct. Even after fetching the new id, the error remains to be there. |
Whenever the code executed properly without errors ? If code is always getting error, even onetime the code never get excuted. Please check the issue #17 for reference send me the output. I try to fix this issue. |
Please mention the error raised by the issue #17 script. In your HTML file contains all required data. you mentioned error is raised when your session-id wrong or Instagram redirect to the login page. By your HTML file, Instagram does not redirect you to the login page. Login again into Instagram in the browser and collect new session-id and try again. Please send your result. |
I am getting no error just that post object is not having text property. But when using InstgramPost() constructor as mentioned by you to get posts opposed of InstgramProfile().posts. And then accessing text property it raises KeyError: graph ql. I have double checked the session id and its correct and latest. Also there was no error when using issue #17 script and I have also attached the generated output in previous comment. I just want to access the text property using InstagramProfile().posts[0].text if that's possible. |
Try this #21 (comment) |
check the following condition,
|
@1999gauravgupta https://www.instagram.com/p/<post_id>/ I checked the post id from the your screenshot it says "Sorry, this page isn't available." Try any other post id |
Try any other Instagram post or try in google colab |
#21 (comment) |
It is impossible. I am unable to find the reason why it makes an error in your case but it is perfectly running in my local. you can try without session id |
Works without sesson id but I won't be able to do much this way I guess. |
Hey, I have the same issue but in my experiment I found that I cannot use current session_id that is logged on in my instagram. In fact, you have to logged out from your account to use that session_id |
Any update @yogeshwaran01 ? |
@1999gauravgupta Try this #21 (comment) |
Nope doesn't work. Seems to be a weird bug. |
@1999gauravgupta ok I try to fix it |
Hi! Anyone managed to fix it? |
Same issue |
I was using this post as a reference- "https://www.instagram.com/p/CNrtoeOp_Et/"
Given caption= Photo shared by LLuvia Bakery on April 15, 2021 tagging @yogisthaan, @healthybuddhaorganic, @studioalaya_proj, fabcafe.in, @masmaracrafts, @Pronatureorganic, @ping_this, and @madansolanki10. May be an image of 5 people and text.
Original caption= It's been a long journey and we have nothing else filling our hearts today except gratitude.
Gratitude for the support and love and patience that everyone in the entire small business ecosystem has showered on us in the last few years. Nothing more to be said , just deep felt Thanks.
The text was updated successfully, but these errors were encountered: