Skip to content

An all-in-one scraper for Fansly written in go with the aid of A.I. Download media, Record lives, and Interact with post from your favorite creators. Available as standalone binaries for all platforms.

Notifications You must be signed in to change notification settings

agnosto/fansly-scraper

Repository files navigation

Fansly Scraper

Note

This is currently under development, everything is still being planned out and tested. Feel free to create issues/pr's to assist in the creation of this project. Tracker will hold a list of things to do for the project, as well as act as a kind of roadmap. I also recommend reading Program Status for more info and currently known issues before running.

A simple all in one fansly interaction tool.

The program will automatically move/download an example config into the config path from either the current directory or the github repo respectively, you will need to edit the config to run the program.

Important

ffmpeg is not needed for content saving, but for livestream recording and potentially saving higher quality videos, it is required.

Installing the program

Releases

Pre-compiled binaries can be downloaded from the releases section.

Manual Compile

git clone https://github.com/agnosto/fansly-scraper && cd fansly-scraper 

go build -o fansly-scraper ./cmd/fansly-scraper

# run the binary
./fansly-scraper

Install Via Go

go install github.com/agnosto/fansly-scraper/cmd/fansly-scraper@latest

Running the program

Interactive TUI

Simply run the program to launch the tui:

./fansly-scraper

Non-Interactive CLI Mode

# Defaults to selecting all
./fansly-scraper --username {creator name} 
# Or using short flag 
./fansly-scraper -u {creator name}

# With Download Option 
./fansly-scraper --username {creator name} --download [all|timeline|messages|stories]
# Or using short flags
./fansly-scraper -u {creator name} -d [all|timeline|messages|stories]

# Add Models to Live Monitoring 
./fansly-scraper --monitor {creator name}
#Or with short flags
./fansly-scraper -m {creator name}

# Live Monitoring Control
./fansly-scraper monitor [start|stop]

Note

Live monitoring requires an active running shell/terminal session, you can use something like zellij/tmux. I may go back to the idea of having it be a background service, but for the time being just implemented as a go version of my fansly-recorder script.

Updating

As this is a wip tool, new versions may be made available sporadically, I've avoided having the program "phone home" and check for updates automatically. However, there is a built-in update argument/command that will check for new releases and update the binary, simply run:

./fansly-scraper update

Get fansly account token

Method 1:

  1. Go to fansly and login and open devtools (ctrl+shift+i / F12)
  2. In network request, type method:GET api and click one of the requests
  3. Look under Request Headers and look for Authorization and copy the value

Method 2:

  1. Go to fansly and login and open devtools (ctrl+shift+i / F12)
  2. Click on Storage and then Local Storage
  3. Look for session_active_session and copy the token value

Method 3 (Recommended) special thanks to prof79's wiki for this:

  1. Go to fansly and login and open devtools (ctrl+shift+i / F12)
  2. In devtools, go to the Console Tab and Paste the following:
console.clear(); // cleanup console
const activeSession = localStorage.getItem("session_active_session"); // get required key
const { token } = JSON.parse(activeSession); // parse the json data
console.log('%c➡️ Authorization_Token =', 'font-size: 12px; color: limegreen; font-weight: bold;', token); // show token
console.log('%c➡️ User_Agent =', 'font-size: 12px; color: yellow; font-weight: bold;', navigator.userAgent); // show user-agent

(images at a later date)

Program Status

Maybe also a faq of sorts

For the time being:

  • It's recommended to leave m3u8_dl in the config set to false if you want things to download fast depending on your hardware. Do feel free to enable to give input/issues with it if you want.
  • Press ESC once done downloading/(un)liking to be able to go back.

"Duplicate Files"

The scraper does what it says, it scrapes. Fansly API response for post can sometimes have the main media item (the preview image you see in the post) and another preview item (one that could be shown depending on timeline permissions), sometimes they can be the same image if that's how the model setup the post I guess.

Disclaimer

"Fansly" is operated by Select Media LLC.

This repository and the provided content in it isn't in any way affiliated with, sponsored by, or endorsed by Select Media LLC or "Fansly".

The developer of this script is not responsible for the end users' actions or any outcomes that may be taken upon the end users' account. Use at your own risk.

About

An all-in-one scraper for Fansly written in go with the aid of A.I. Download media, Record lives, and Interact with post from your favorite creators. Available as standalone binaries for all platforms.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages