Replies: 3 comments 2 replies
-
I believe I may have answered my own question. It looks like this is handled by the 'ofsorter.py' script within the extras directory. Assuming the 'user_directory' argument is the directory for a given provider, it appears the tool searches within the provider directory for matching file names like I described in my question above. Can anyone confirm? |
Beta Was this translation helpful? Give feedback.
-
Bumping this to see if anyone can confirm my understanding of the above. Would feel better about not manually structuring existing directories not originally created by this tool if I knew the code was designed to handle this. |
Beta Was this translation helpful? Give feedback.
-
Yes when you change the filename structure, it automatically restructures the directory. Media is detected by reading the metadata files. It then scans the username directory for all the filenames that is stored in the metadata files. |
Beta Was this translation helpful? Give feedback.
-
I'll start by saying that I have very limited experience with Python. I'm an EE with basic knowledge of VBscript, C++, Matlab, etc. - not a master programmer by any means.
I modified the 'file_directory_format' within config.json to be "{site_name}/{model_username}/{api_type}/{value}". Default was "{site_name}/{username}/{api_type}/{value}/{media_type}". I wanted to simplify the directory structure and don't mind images and videos being in the same folder. I prefer to use FInder's 'Arrange By: Kind' feature.
When doing this I thought I was going to have to manually move any image or video files I had previously downloaded from their respective folders ('Images', 'Videos') to the higher-level '{value}' folder (i.e., 'Free', 'Paid'). Otherwise I assumed the code wouldn't recognize the previously downloaded files and redownload them all under the appropriate '{value}' folder. Except I forgot to manually restructure the directory for one provider I was scraping and it looks like all of the previous downloads were automatically relocated (based on the created date shown in Finder not being today's date... seems to be when I had initially downloaded these files). Some of these files hadn't even been originally downloaded with this Python scrapper (used to use a browser extension before I found this beautiful tool), yet were still relocated. I used to store media from Archived posts in the same folder as regular Posts - even these were relocated to an 'Archived' folder.
Questions are as follows:
Thanks for the help.
Beta Was this translation helpful? Give feedback.
All reactions