You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"extractor": {"reddit":
{"subreddit": {"directory": ["Reddit","r_{subreddit}"],"filename": "{author}_{title[:180]!t:R /_/}{num:?_//>02}_{id}.{extension}"},"user": {"directory": ["Reddit","u_{author}"],"filename": "{title[:180]!t:R /_/}{num:?_//>02}_{id}.{extension}"},"#": "transfer metadata to any child extractor as '_reddit_'","parent-metadata": "_reddit_",},"redgifs": {"image": {"directory": {"'_reddit_' in locals() and '_reddit_[subcategory]' == 'subreddit'": ["Reddit","r_{_reddit_[subreddit]}"],"'_reddit_' in locals()": ["Reddit","u_{_reddit_[author]}"],"" : ["Redgifs","Clips","Unsorted"]}},"filename": {"'_reddit_' in locals()": "{_reddit_[title][:180]!t:?/_/R /_/}{_reddit_[id]}_redgifs.{extension}","" : "{filename}.{extension}"},"format": ["hd","sd","gif"],"fallback": true,"skip": true}}}
I would love to have files saved in Reddit/r_subreddit/ when I download a subreddit (instead of a user profile), but this only works for the extractor itself and not for the redgifs child extractor.
How would I need to change this directory condition to actually figure out if I am downloading a subreddit or not?
"'_reddit_' in locals() and '_reddit_[subcategory]' == 'subreddit'"
Currently all redgif files end up in Reddit/u_username/.
Thanks!
The text was updated successfully, but these errors were encountered:
trych
changed the title
Retrieve Reddit subcategory when redgif runs as child extractor
Retrieve Reddit subcategory when redgifs runs as child extractor
Feb 12, 2025
This compares the strings "_reddit_[subcategory]" and "subreddit". To access the actual subcategory value, you should not put _reddit_[subcategory] in quotes but only the subcategory part:
"'_reddit_' in locals() and _reddit_['subcategory'] == 'subreddit'"
Also, you can use reddit>redgifs as config section to not have to check for '_reddit_' in locals():
@mikf Thank you so much. I thought I had tried literally every possible combination of single quotes and other variants on that conditional statement. Apparently not, though. Works really well, thanks a lot!
Hi there!
I have this config setup:
I would love to have files saved in
Reddit/r_subreddit/
when I download a subreddit (instead of a user profile), but this only works for the extractor itself and not for the redgifs child extractor.How would I need to change this directory condition to actually figure out if I am downloading a subreddit or not?
"'_reddit_' in locals() and '_reddit_[subcategory]' == 'subreddit'"
Currently all redgif files end up in
Reddit/u_username/
.Thanks!
The text was updated successfully, but these errors were encountered: