Closed redcomando1 closed 1 year ago
This script was designed mostly for unix like systems to be used on servers to auto-download the streams even if you're not at your pc or it's off, which is why it also uses webhooks to notify when a model is live. All the software would be highly recommended to learn as well as being usable on windows.
However; to use on windows in a similar fashion(minus if the pc is off) would require a bit of editing of the script or use WSL which is honestly probably what i would recommend, but the first might be better suited. You would still need to edit some stuff if you just want it all to be local.
You'll need the following regardless of which you choose to do:
Python - when installing there will be a check box that says add to PATH
, make sure to click that
ffmpeg - this seems like a good guide on getting it setup properly
some text editor that shows the line numbers.
Non-wsl local use: Since I'm not currently on windows to confirm i'm just gonna give the lines that i'm pretty sure you would need to get rid of to have this work completely locally: (look at the script on github to be sure of the lines while getting rid of them)
ln 14-20, ln 137-180, (this will get rid of the making of a thumbnail sheet of the live and the uploading of it) ln 191 (gets rid of the call to the upload function )
and if you don't want webhooks to be notified: ln 12, ln 122-133, ln 201-219, ln 239 (and get rid of the # on ln 240)
that should be everything you need to change to get it working locally, you just need to open a terminal in the same folder as the script and run pip install -r requirements.txt
then python3 fansly-recorder.py {username}
and it should work completely locally.
I will also be working on it to add config options to make it more modular and allow for base use locally or more robust automated use
Thank you for replying and posting a guide for WSL, I've got python, and ffmpeg setup through the guide.
got a warning on the pip install -r requirements.txt [warning below]
WARNING: The script tqdm is installed in '/home/bluestone/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts futurize and pasteurize are installed in '/home/bluestone/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script normalizer is installed in '/home/bluestone/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script discord_webhook is installed in '/home/bluestone/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Don't know if this is normal.. also getting zero exit status 127 when starting recording for a user which didn't need to be followed, etc
bluestone@zserve1:/mnt/c/users/redco/desktop/testting$ python3 fansly-recorder.py xkonekoneko
[info] Starting online check for xKonekoNeko
Webhook status code 404: {"message": "Unknown Webhook", "code": 10015}
[warning] Failed to send webhook notification: 404 Not Found
[ffmpeg] Saving livestream to xKonekoNeko_20230722_161259_v413838500446609409.ts
/bin/sh: 1: ffmpeg: not found
Traceback (most recent call last):
File "/mnt/c/users/redco/desktop/testting/fansly-recorder.py", line 194, in
ffmpeg seemed to not be in the wsl so I installed in it the wsl and now im getting [error]
bluestone@zserve1:/mnt/c/users/redco/desktop/testting$ python3 fansly-recorder.py succupuplily
Traceback (most recent call last):
File "/mnt/c/users/redco/desktop/testting/fansly-recorder.py", line 194, in
I'm not entirely sure but I have a guess, which I did make note of in the dev branch (that i'll be merging soon that makes some changes) with a work around:
One thing to try doing, is changing both instances of this:
async with aiohttp.ClientSession(connector=connector, headers=config.headers) as session:
to this (getting rid of connector=connector):
async with aiohttp.ClientSession(headers=config.headers) as session:
Regarding the issue with PATH, the following may resolve that:
nano ~/.bashrc
in wslif [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
ctrl + x
then y
then enter
source ~/.bashrc
From there ensuring the requirements are gotten again:
pip3 install -r requirements.txt
As well as ensuring ffmpeg is setup to be used
ffmpeg -version
and just incase anyone else comes across this, you can run the following to install python and ffmpeg on wsl as such:
sudo apt install python3 ffmpeg -y
Other than that, the newer version of the script should be coming within a couple days that will allow you to disable certain things instead of having to get rid of things but the core of it is mostly the same so you could just stick with what you have now if it starts working. It will use more header inputs and account token to get streams that require following/sub tho
Also wsl isn't needed as python scripts will run on windows as well, but the way installing apps on there works is easier than editing system variables to use anywhere (at least for me).
thank you again for replying, I completed the fixes you had posted, currently testting it to see if it will work.
to add my cookies to the header while using WSL, do I use the one from my firefox on windows or do I have to set some thing else up.
on a side note I see something for account_id
yea the ones from your browser, you can replace the
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
}
in the script with the following:
headers = {
'authority': 'apiv3.fansly.com',
'accept': 'application/json, text/plain, */*',
'accept-language': 'en;q=0.8,en-US;q=0.7',
'authorization': 'your_auth_token_here', # Replace with your actual auth token
'origin': 'https://fansly.com',
'referer': 'https://fansly.com/',
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
}
and this is a short guide i write for getting the token.
And instances of account_id are the models account id, used to get the link to record the live.
Need to test more however, is working so far, will close
Thank you so much for your help was able to run it in wsl on tmux and is running fine.
On Windows 10, looking for complete guide for installation and running.
needed programs -python -github [https://github.com/agnosto/fansly-recorder] [https://github.com/mutschler/mt#installation-from-source] -Rclone -Tmux
the step by step guide in place is requiring unfamiliar software that is complicating the install, and is requiring learning this software.
Is there a way to run the bot(s), and have the files be locally downloaded and if possible run with .exe or guide for windows setup.