Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONDecodeError Help #5602

Open
Aristarchus-IV opened this issue May 17, 2024 · 0 comments
Open

JSONDecodeError Help #5602

Aristarchus-IV opened this issue May 17, 2024 · 0 comments

Comments

@Aristarchus-IV
Copy link

Aristarchus-IV commented May 17, 2024

I've been trying to figure out the errors it throws, but when I think I fix it, another one pops up. I've tried searching the web and the issues section here, but I am unable to fix my JSON problem. Any help would be appreciated, thank you.

Edit: I found this https://github.com/mikf/gallery-dl/wiki/config-file-outline#first-steps, and tried using the tools. But I am stuck on (image below) and cannot figure out what it wants. For the "colon", when I put them, it doesn't work. This is from VS code.

Screenshot 2024-05-17 at 9 31 53 PM

It also made me edit

"filename": "count > 1": "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}_{num}.{extension}", "" : "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}.{extension}"

to

"filename": "count > 1", "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}_{num}.{extension}": "" , "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}.{extension}"

Specifically,

(1) "count > 1": --> "count > 1",
(2) "" : --> "" ,
(3) .{extension}", --> .{extension}":

I'm not sure if this is right or not because I copied and pasted this from the owner on here (99% sure).


Also,

  • In the "postprocessors" section, I added the "directory" line, though I'm not sure if that is the appropriate place for it. I believe I've formatted everything else correctly (for the most part since I'm posting here).

[ --verbose --simulate ]

% gallery-dl "https://www.instagram.com/manurios/" --verbose --simulate
[config][error] JSONDecodeError when loading '/Users/[REDACTED]/.config/gallery-dl/config.json': Expecting ':' delimiter: line 29 column 5 (char 1002)
[gallery-dl][debug] Version 1.26.9
[gallery-dl][debug] Python 3.9.4 - macOS-10.16-x86_64-i386-64bit
[gallery-dl][debug] requests 2.31.0 - urllib3 1.26.18
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting SimulationJob for 'https://www.instagram.com/manurios/'
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/manurios/'
[instagram][debug] Using InstagramPostsExtractor for 'https://www.instagram.com/manurios/posts/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/web_profile_info/?username=manurios HTTP/1.1" 200 55595


[Instagram Config]

{
"extractor":
{
"base-directory": "/Users/[REDACTED]/Applications/gallery-dl",
"parent-directory": false,
"cookies": ["firefox"],
"archive": "/Users/[REDACTED]/Applications/gallery-dl/-/download-archives/gallery-dl-archive.txt",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0",
"skip": true,
"sleep-429": 60,
"retries": 4,

"instagram":
{
"api": "rest",
"include": "all",
"order-files": "asc",
"order-posts": "asc",
"previews": true,
"sleep": [2.0, 10.0],
"sleep-request": [6.0, 12.0],
"videos": true,

"posts":
{
"directory": ["Instagram", "{username}", "Posts"],
"filename": "count > 1", "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}_{num}.{extension}":
""         , "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}.{extension}"
},
"reels":
{
"directory": ["Instagram", "{username}", "Reels"],
"filename": "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {media_id}.{extension}"
},
"tagged":
{
"directory": ["Instagram", "{tagged_username}", "Tagged"],
"filename": "count > 1", "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}_{num}.{extension}":
""         , "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {sidecar_media_id:?/_/}~{media_id}.{extension}"
},
"stories":
{
"directory": ["Instagram", "{username}", "Stories"],
"filename": "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {media_id}.{extension}"
},
"highlights":
{
"directory": ["Instagram", "{username}", "Highlights", "{highlight_title}"],
"filename": "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode} - {media_id} - {post_id}.{extension}"
},
"avatar":
{
"directory": ["Instagram", "{username}", "Avatar"],
"filename": "{username} - {post_shortcode} - {media_id} - {owner_id}.{extension}"
},

"postprocessors": [
                {
"directory": ["Instagram", "{username}", "Metadata", "Posts"],
"name": "metadata",
"event": "post",
"filename": "{username} - {date:%Y-%m-%d %H.%M.%S} - {post_shortcode}.txt",

"mode": "custom",
"format": "{description}\n{embed[url]:?/\n/}"
},

}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant