Closed thejasonhsu closed 1 year ago
Hi @thejasonhsu, Thank you for reporting that issue! Can you confirm what is the maximum number of objects in the first json file? In other words - at what point subsequent files are being generated for your followers data?
I can update the code to account for that in the coming week, but feel free to open a pull request if you’re interested.
Np. Won't be submitting PR since I can't fix it via Go haha.
Hi @thejasonhsu, I've addressed the issue in the latest commit. I tested this locally with some dummy data - it should work fine for you too. Could you please sync the latest changes to your fork and confirm whether it works as expected?
It still only reads the first json.
The application extracts the zip file that you provide to a folder called instagram_data
.
Afterward, it assumes the following structure:
$ tree instagram_data
instagram_data
└── followers_and_following
├── followers_1.json
├── followers_2.json
├── following.json
There can be an infinite number of followers_n.json
files in your followers_and_following
folder.
Here are the contents of my dummy files:
$ cat instagram_data/followers_and_following/followers_1.json
[
{
"title": "",
"media_list_data": [
],
"string_list_data": [
{
"href": "https://www.instagram.com/test1",
"value": "test1",
"timestamp": 1664195508
}
]
}
]
$ cat instagram_data/followers_and_following/followers_2.json
[
{
"title": "",
"media_list_data": [
],
"string_list_data": [
{
"href": "https://www.instagram.com/test2",
"value": "test2",
"timestamp": 1663444411
}
]
}
]
The application adds all unique elements from the followers_n.json
files to a list and the final result is the following:
The number of elements in the JSON arrays shouldn't matter because the application will work in the same way regardless of the array sizes. Let me know if you think the outcome should be different. It would be helpful if you can confirm the folder structure is the same for you.
Your assumption and design are correct. I can confirm that my folder structure follows the design.
$ tree instagram_data
instagram_data
└── followers_and_following
├── followers_1.json
├── followers_2.json
├── following.json
Right now it only reads followers_1.json.
My assumption is followers_n.json contains only followers_1.json at the moment. Is there a way to read/debug this file during/after workflow?
If your follower list is huge, you'll receive followers_1.json, followers_2.json, etc. I'm a Go noob so my current workaround is manually combining _2.json, _3.json, etc. into _1.json.