Closed gamer13766 closed 3 years ago
Okay I think I see the issue there, I'll fix this tomorrow when I've got a minute.
Alright the purchased posts should be downloading properly now. Let me know if you still have an issue.
Okay so it works...kinda.
If I run the single "python onlyfans-dl.py name" from CMD, it works fine.
But it throws this error when I run my script that just repeats
python onlyfans-dl.py name1
python onlyfans-dl.py name2
python onlyfans-dl.py name3
as part of a batch file (just for each downloading). But this is on me to fix now, so thank you for your work.
I just added a commit that allows you to download multiple profiles at a time, so it might save you from having to put it in a loop.
Nice one. Just tried it and had the same issue however. Downloads the first one and then errors.
D:\OnlyFans\profiles>python dlof.py all
user exists.
Downloading new media, skipping pre-existing.
Found 576 posts
Downloaded 0 new posts
Found 8 archived
Downloaded 0 new archived
Found 1 messages
Downloaded 0 new messages
Found 88 purchased
Traceback (most recent call last):
File "D:\OnlyFans\profiles\dlof.py", line 229, in <module>
get_content("purchased", "/posts/paid")
File "D:\OnlyFans\profiles\dlof.py", line 178, in get_content
if MEDIATYPE == "purchased" and post["fromUser"]["username"] != PROFILE:
KeyError: 'fromUser'
It then stops here.
I've re-downloaded the script and set it up again, and re-done the pip install requests. Really not sure what I'm missing here now though.
Although I wasn't able to reproduce the error, I put an extra check for that array element that should prevent that error. Let me know if the purchased objects download now or if you get a different error.
Nice work my dude, that looks to have sorted it.
Bit of a weird one though, I set up the script on a Ubuntu machine and it threw the same error. All working now though!
When you specify the "all" flag, how does it sort each profile? Most recently subscribed to?
For the API call to get the list of all subscribed profiles, I didn't explicitly set an order, so it uses the default one which is just order = descending, so I'm not sure what order that refers to.
No worries, just looking at the profiles as the script runs, doesn't seem to be in any order that I recognise.
Happy to close this now.
Running the script for a user where they have sent me a message and I've paid for the content in the DM
Traceback (most recent call last):
File "D:\OnlyFans\profiles\onlyfans-dl.py", line 186, in <module>
get_content("purchased", "/posts/paid")
File "D:\OnlyFans\profiles\onlyfans-dl.py", line 142, in get_content
if MEDIATYPE == "purchased" and post["fromUser"]["username"] != PROFILE:
KeyError: 'fromUser'
Everything else appears to work fine though