k0rnh0li0 / onlyfans-dl

OnlyFans content downloader
GNU General Public License v3.0
772 stars 221 forks source link

Error in lines 354, in <module> API_HEADER = create_auth() and in line 54, in create_auth "User-Agent": #224

Closed HitoSantos closed 8 months ago

HitoSantos commented 1 year ago

I'm getting the errors below when I try to run the script:

(1) line 354, in API_HEADER = create_auth()

(2) line 54, in create_auth "User-Agent": ljson[""],

Any ideas?

jordon31 commented 1 year ago

image

Put this

HitoSantos commented 1 year ago

image

Put this

Hey, thanks for the help.

I tried it and it still doesn't work. I use a Mac so my User-agent is

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

Traceback (most recent call last): File "/Users/Me/Desktop/onlyfans-dl/onlyfans-dl.py", line 354, in API_HEADER = create_auth() ^^^^^^^^^^^^^ File "/Users/Me/Desktop/onlyfans-dl/onlyfans-dl.py", line 54, in create_auth "User-Agent": ljson ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"],


KeyError: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36'
ghost commented 1 year ago

Looks like you edited the onlyfans-dl.py script while you shouldn't. As directed in the README, you should set these session variables in the auth.json file.