Reddit Gallery - Get image dimensions for filename #5489
Unanswered
AryanVerma1024
asked this question in
Q&A
Replies: 2 comments 2 replies
-
I tried doing it by separating the galleries from the normal posts and got this to work but cant figure out how to do this without the \fF "filename": {
"is_gallery == True" : "\fF {subreddit_id} {id} {str(num).zfill(2)} {media_metadata[filename]['s']['x']}x{media_metadata[filename]['s']['y']} {filename}.{extension}",
"" : "{subreddit_id} {id}{num:? //>02} {preview['images'][0]['source']['width']}x{preview['images'][0]['source']['height']} {filename}.{extension}"
} But when i convert it to this, it again just gives out NonexNone "filename": {
"is_gallery == True" : "{subreddit_id} {id}{num:? //>02} {media_metadata[filename]['s']['x']}x{media_metadata[filename]['s']['y']} {filename}.{extension}",
"" : "{subreddit_id} {id}{num:? //>02} {preview['images'][0]['source']['width']}x{preview['images'][0]['source']['height']} {filename}.{extension}"
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
After trying to do this without \fF for almost the past hour i have just decided to use this: "filename": {
"'/gallery/' in url" : "\fF {subreddit_id} {id} {str(num).zfill(2)} {media_metadata[filename]['s']['x']}x{media_metadata[filename]['s']['y']} {filename}.{extension}",
"" : "{subreddit_id} {id} {preview['images'][0]['source']['width']}x{preview['images'][0]['source']['height']} {filename}.{extension}"
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I mainly use gallery-dl to download wallpapers, so I have tried to add the dimensions of a image to the filename of reddit. This works fine for individiual images but when trying to download a gallery it just results in a None value, is there any way to get the dimension for each image (hopefully one solution for both single images and galleries).
Current filename config:
this when used on galleries gives the following:
how it works on images(this aint no wallpaper i just picked the first thing i saw):
Beta Was this translation helpful? Give feedback.
All reactions