renamer script not working
I'm on version 5.1, and when I try to download a model's page it shows me this error:
2020-07-01 12:30:34,711 ERROR errors [WinError 3] The system cannot find the path specified: 'D:\\Downloads\\.tools\\OnlyFans\\.sites\\OnlyFans\\harleymichelle\\Posts\\Free\\Images'
Traceback (most recent call last):
File "D:\Downloads\.tools\OnlyFans\datascraper\main_datascraper.py", line 186, in start_datascraper
result = x.start_datascraper(
File "D:\Downloads\.tools\OnlyFans\modules\onlyfans.py", line 92, in start_datascraper
results = prepare_scraper(
File "D:\Downloads\.tools\OnlyFans\modules\onlyfans.py", line 512, in prepare_scraper
export_archive(metadata_set, archive_directory, json_settings)
File "D:\Downloads\.tools\OnlyFans\helpers\main_helper.py", line 101, in export_archive
datas2 = ofrenamer.start(archive_path, json_settings)
File "D:\Downloads\.tools\OnlyFans\extras\OFRenamer\start.py", line 79, in start
metadata.valid = fix_metadata(
File "D:\Downloads\.tools\OnlyFans\extras\OFRenamer\start.py", line 64, in fix_metadata
files = os.listdir(folder)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:\\Downloads\\.tools\\OnlyFans\\.sites\\OnlyFans\\harleymichelle\\Posts\\Free\\Images'
That is with "sort_free_paid_posts": false,
If I set it to true it simply re-downloads everything from scratch
I also tried to run the renamer script directly and I get this error message:
Traceback (most recent call last):
File "start.py", line 148, in <module>
start(metadata_filepath, json_settings)
File "start.py", line 79, in start
metadata.valid = fix_metadata(
File "start.py", line 64, in fix_metadata
files = os.listdir(folder)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:\\Downloads\\.tools\\OnlyFans\\.sites\\OnlyFans\\harleymichelle\\Posts\\Free\\Images'
I had downloaded all her content before upgrading to the new version, so nothing is sorted into free or paid folders
(p.s. the readme says that if I set "sort_free_paid_posts": false, it will be incompatible ... how so/incompatible with what?)
Here is the filename format I was using previously:
"directory": "./downloads",
"file_name_format": "{username}/{date}_~_{text}_~_{file_name}.{ext}",
And per suggestions I had seen, my new filename format:
"download_path": "./{site_name}",
"file_name_format": "{username}/{date}_{post_id}_{media_id}~~~{file_name}.{ext}",
As an aside, while I will keep {text} out of the file-naming going forward, how do you all add any kind of context to the files so that you know what each file is/about? (b/g scenes, g/g scenes, solo scenes, etc)
Do the model directories need to have a specific file structure for the renamer to work properly?
In previous versions I was using this (the first OnlyFans being the root script dir):
OnlyFans\downloads\onlyfans\{username}\
OnlyFans\downloads\stars_avn\{username}\
now it looks like this:
OnlyFans\.sites\OnlyFans\{username}\
I tried copying the model's folder into the new directory structure
I had downloaded all her content before upgrading to the new version, so nothing is sorted into
freeorpaidfolders (p.s. the readme says that if I set"sort_free_paid_posts": false,it will be incompatible ... how so/incompatible with what?)
Incompatible with the whole script and which would create errors. You should just set it to true. The whole script is built around free/paid file structure now.
The script already moves everything that wasn't deleted by the model to the new file structure anyway.
The download_path should be using a full path instead of "./" or use two dots instead of one.
So here is my whole config for OF:
"settings": {
"auto_choice": "a",
"auto_scrape_names": false,
"auto_scrape_apis": true,
"download_path": "D:/Downloads/.tools/OnlyFans/downloads/{site_name}",
"file_name_format": "{username}/{date}_{post_id}_{media_id}~~~{file_name}.{ext}",
"text_length": "42",
"overwrite_files": false,
"date_format": "%Y-%m-%d",
"ignored_keywords": [],
"ignore_type": "",
"export_metadata": true,
"delete_legacy_metadata": false,
"sort_free_paid_posts": true,
"blacklist_name": ""
},
"extra_auth_settings": {
"extra_auth": false,
"choose_auth": false,
"merge_auth": false
It is re-downloading everything instead of renaming Is the renamer script meant only to rename posts already in the new (free/paid) format, or to also rename/move files from the old format?
When I run the renamer separately I get this error
Traceback (most recent call last):
File "start.py", line 143, in <module>
folders = os.listdir(metadata_directory)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:/Downloads/.tools/OnlyFans/downloads/OnlyFans\\allybabyxo6\\Metadata'
What is the correct full path of allybaby?
D:/Downloads/.tools/OnlyFans/downloads/OnlyFans/allybabyxo6
Are you not subscribed to allybabyxo6 anymore?
no not anymore. I thought it would just skip over the ones I'm not sub'd to though, like the downloader only shows/works sub'd accounts
in the image folder of allybabyx06, is there a metadata folder
There is not
The default folder structure for all the models I've subscribed to do far is
{username}
Messages
Audios
file.mp3
Metadata
Audios.json
Images.json
Videos.json
Images
file.jpg
Videos
file.mp4
Posts
Audios
file.mp3
Metadata
Audios.json
Images.json
Videos.json
Images
file.jpg
Videos
file.mp4
Stories
Audios
file.mp3
Metadata
Audios.json
Images.json
Videos.json
Images
file.jpg
Videos
file.mp4
Edit I pressed close and comment by mistake
Closed by mistake?
Yes haha. I updated my comment too not sure if you saw that
I think I have a similar issue, and it may be because I borked my config. Just updated today and I didn't read too closely and assumed "download_path" would append "OnlyFans" as (I believe?) it did previously. So where before I had model folders at "/mnt/isos/OnlyFans", model folders were getting put at "/mnt/isos". I aborted the script and attempted to use rsync to fix my mistakes. Re-running the scraper resulted in the same exception above.
In the Metadata folder at the root of the model folder, so "/mnt/isos/OnlyFans/{model}/Metadata", the .json files had the incorrect path rooted at "/mnt/isos".
Not sure if this helps @docholllidae2. May need to fix paths in the metadata json? I'm not sure how the internals of the scraper work.
Hmmm I will try checking my metadatas, though there is not any metadata folder in the root of the model folder for me; there are several, one in each of the post type's folder (one in posts another in messages and one in stories)
I still get that same error when
Again I accidentally tapped close. I need to stop doing this on mobile.
I updated the metadata .json files with the full and correct path but still get that same error when running the renamer
if it matters, the version I was on previously was 4.0
I went through every Metadata json I could find and corrected the download path and that fixed it for me
Use the latest commit
I just tried the latest commit, and it still downloads everything fresh instead of renaming.
How does the renamer work? Does it look for metadata folder in the root of the model directory? None of my model directories have one there; they are all in their post types (eg model\Posts\metadata\ and model\Messages\metadata)
start_ofd.py creates a model\metadata\ folder, but the newly-created Posts.json points to the also newl-created model\Posts\Free\Images folder
Should it check for model\Posts\metadata\Images.json and model\Posts\Images\file.jpg instead and move and rename files from there?
Also, when I run the renamer directly now I get this error
Traceback (most recent call last):
File "start.py", line 149, in <module>
for models_folder in content_folders:
NameError: name 'content_folders' is not defined
@docholllidae2 oh ye, is the model\metadata folder empty?