This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
Getting Nan values #91
Unanswered
rcmurakami
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to run the example code below and I am getting Nan values to likes and comments. Are there something wrong with this?
import pandas as pd
from instascrape import Profile
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": "sessionid=MYSESSIONID"
}
chris = Profile('google')
chris.scrape(headers=headers)
recent_posts = chris.get_recent_posts()
posts_data = [post.to_dict() for post in recent_posts]
posts_df = pd.DataFrame(posts_data)
print(posts_df[['upload_date', 'comments', 'likes']])
Beta Was this translation helpful? Give feedback.
All reactions