Closed yarnball closed 8 years ago
Do you mean the number of comments and the number of likes? Or the full list of usernames that liked/comment on each photo? Or the full contents?
The script already gives you the media id of each photo on the resulting csv, with that in hands you can probably use the official API to get comments and likes:
Would like the content of the comments themselves.
I have not been approved for API access so I won't be able to use their API.
Can you suggest another way?
Is the media ID the "code" part of the json? EG is it "BJU0eeEj-cY" from below?
{
"date": 1471684929,
"owner": {
"username": "egofin"
},
"code": "BJU0eeEj-cY",
"display_src": "https://igcdn-photos-e-a.akamaihd.net/hphotos-ak-xpt1/t51.2885-15/e35/14033007_186402161780164_1837128116_n.jpg?ig_cache_key=MTMyMDkxMTM4MzAxODA3MTgzMg%3D%3D.2"
},
hmm, the media id is not there, I am uploading a patch that will include id, comments count and likes count, just a moment…
the latest version of the scripts are including an id now, please test it and let me know if that's the right id
Great, the latest version does include an ID, and a count of likes/comments!
Is there anyway, using your script, I can scrape the comment content?
not at the moment, the main script gets this info from the graphql query made by the tags page, that brings equivalent metadata of a media query like this (click the response button):
https://www.instagram.com/developer/endpoints/media/
To get the comments content would probably require one extra request per photo.
But is it possible to get access to the comments without API access? Also, your latest commit doesn't seem to write the extra meta-data to the CSV. Mine only contains the image link, username, date and ID (I think- eg "BEOsnBFthwQ").
What needs to be done to get the link/comment count to in the .csv?
Thanks- so I see that I need to go to instagram.com/p/"media-id"
to see the id. But how can I integrate this in you script? Or even create a simple new one that still uses the cookie etc, and grabs the comments?
Hi,
Amazing work on this. Well done!
I'd like to somehow get comments (likes if possible) on the images too. What needs to be added to "metadata.sh" to achieve this?