fczuardi / instagram-hashtag

Shell scripts to get metadata from instagram photos of a certain hashtag without the API, hacking browser calls instead. ( visaourbanaiz )
Other
7 stars 0 forks source link

Metadata missing from .csv #5

Open yarnball opened 8 years ago

yarnball commented 8 years ago

Hi,

I've downloaded the latest commit, and the media "ID, and "likes" and "comments" counts do not appear in the "metadata.csv".

The data points are visible in the json files, but don't seem to get copied accross

fczuardi commented 8 years ago

try deleting your old .csv and running metadata.sh again

by default metadata.sh appends the lines instead of replacing the whole file.

yarnball commented 8 years ago

Yep did this and it didn't work. Also did a fresh clone of the latest repo, and still the CSV did not include those details. Could you check it out?

fczuardi commented 8 years ago

by looking at the code here https://github.com/fczuardi/instagram-hashtag/blob/master/metadata.sh#L8

we can see that the last 3 columns of each csv lines should be comments.count, likes.count and id from the .json files under the /json folder

...","+(.comments.count|tostring)+","+(.likes.count|tostring)+","+(.id|tostring)'

Do your json files contain those fileds?

yarnball commented 8 years ago

json contains those fields. And my metadata.sh also looks like that. It is strange. A screenshot: 2016-09-06 at 12 02 06 am

JSON sample:

{ "code": "BJFJTphBaTX", "comments": { "count": 1 }, "date": 1471158979, "likes": { "count": 43 }, "owner": { "username": "gallery_gayo" }, "id": "1316499398741828823", "display_src": "https://scontent-syd1-1.cdninstagram.com/t51.2885-15/s640x640/e15/14031600_1781683188779843_1535219866_n.jpg?ig_cache_key=MTMxNjQ5OTM5ODc0MTgyODgyMw%3D%3D.2" },

yarnball commented 8 years ago

This is my mistake. I was confused because your current repo ships with a .csv file already full of data.

Anyway, make sure to add to your guide to write "./metadata.sh".

Thanks again for the great work.