k0rnh0li0 / onlyfans-dl

OnlyFans content downloader
GNU General Public License v3.0
770 stars 222 forks source link

KeyError for User-Agent #171

Closed cfoote7 closed 10 months ago

cfoote7 commented 2 years ago

I'm getting the following error when I try to use this tool

Traceback (most recent call last): File "C:\Users\Chris Foote\onlyfans-dl-master\onlyfans-dl.py", line 345, in API_HEADER = create_auth() File "C:\Users\Chris Foote\onlyfans-dl-master\onlyfans-dl.py", line 54, in create_auth "User-Agent": ljson["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0"], KeyError: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0'

anyone else run into this and know a solution?

SnugglinBunny commented 2 years ago

in your auth file the user agent line should be like this: "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0",

so remove ljson[ and the bracket at the end