Voldrix / onlyfans-dl-2

OnlyFans content downloader v2
GNU General Public License v3.0
148 stars 24 forks source link

I get signed out when I run the script #88

Closed lothkang closed 1 year ago

lothkang commented 1 year ago

Whenever I run the script, I get the following:

SUBSCRIPTIONS ERROR: http 401
Traceback (most recent call last):
  File "/home/weylyn1/Letöltések/XXX/OnlyFans/./onlyfans-dl.py", line 232, in <module>
    for PROFILE in PROFILE_LIST:
TypeError: 'NoneType' object is not iterable

Once I return to my browser and refresh the page, I'm logged out.

deadbeatdandylyon commented 1 year ago

Haven't came across that issue yet. I'm just unable to download anything new,

blmatthews commented 1 year ago

401 is Unauthorized, so you don't have one or more of the session variables set correctly. I'm not sure why get_subscriptions isn't exiting, but it's trying to get the subscriptions, that's returning a 401, and somehow it's returning instead of exiting, and returning None. Then when it tries to iterate over None, it's blowing up.

You're logged out in your browser either because you were logged out before running the script because the browser was using out-of-date auth information (probably the user agent changed), or when you tried to log in via the script with incorrect credentials it invalidated your session ID effectively logging you out everywhere.

Executive summary: Update the session variables. I just ran the script with up-to-date session variables and it worked fine.

blmatthews commented 1 year ago

lol. It turns out I had out-of-date code. Now get_subscriptions returns instead of exiting if the request to get all the subscriptions fails (via commit 1876036, which seems like a flawed change, it just means the for PROFILE in PROFILE_LIST is going to blow up). So my conclusion stands: you have outdated session variables, although now I see why you're getting the error you are.

lothkang commented 1 year ago

Interesting.I made sure to update all thre variables and use the most up to date browser version. I even made sure to clear cookies in my browser and log in to a clear session.

lothkang commented 1 year ago

OK, I've just started over. Re downloaded the script and created a new browser profile, just to be sure, and now it works.