agnosto / fansly-recorder

Record fansly streams live and upload to remote using rclone
https://fansly.com/live/your-fav-egirl
10 stars 2 forks source link

if data is not None and data['success'] and data['response']['stream']['access']: #4

Open zoeysama opened 2 months ago

zoeysama commented 2 months ago

Traceback (most recent call last): File "/root/fansly-recorder/fansly-recorder.py", line 266, in asyncio.run(Start()) File "/root/.pyenv/versions/3.10.14/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/root/.pyenv/versions/3.10.14/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/root/fansly-recorder/fansly-recorder.py", line 255, in Start if data is not None and data['success'] and data['response']['stream']['access']: KeyError: 'access'

running on Ubuntu22, get the config.py set. Did I miss something? Thanks!

Yougoshatenshi commented 2 months ago

had the same problem, removed in line 254 of fansly-recorder.py the ['access'] to get it to work. if data is not None and data['success'] and data['response']['stream']: since then its working fine for me.

agnosto commented 3 weeks ago

I forgot to actually get the access value from the request, so the script was checking against nothing causing it to crash. I just pushed an update that should hopefully resolve that. I am in a new dev environment and haven't ran the script on here at all yet, as well as I lost access to my testing fansly account, so I don't even know if anyone is live for me to test right now.

The access block is for checking if you actually have access to see the stream (followed / subbed / bought ticket / etc) and to stop it from crashing if you didn't have access and they were live (at least what I remember would happen).

So if you don't have access, for example not subbed, and their live requires you to be subbed, the script will continue as if they're offline since you're not able to actually see it.

Yougoshatenshi commented 3 weeks ago

thank you its working with the patch. Although i couldnt test yet the sub only streams myself.

agnosto commented 3 weeks ago

I do believe if it works on any models that require you to follow to view the live, then it should work for sub only streams since it's only the overall access value used to check to see, but I'll wait for some feedback whenever you can test