This is a rewrite/refactoring of Avnsx's original Fansly Downloader. Fansly Downloader NG supports new features:
- Full command-line support for all options
config.ininot required to start the program anymore - aconfig.iniwith all program defaults will be generated automatically- Support for minimal
config.inifiles - missing options will be added from program defaults automatically - True multi-user support - put one or more creators as a list into
config.ini(username = creator1, creator2, creator3) or supply via command-line - Run it in non-interactive mode (
-ni) without any user intervention - eg. when downloading while being away from the computer - You may also run it in fully silent mode without the close prompt at the very end (
-ni -npox) - eg. running Fansly Downloader NG from another script or from a scheduled task/cron job - Logs all relevant messages (
Info,Warning,Error, ...) of the last few sessions tofansly_downloader_ng.log. A history of 5 log files with a maximum size of 1 MiB will be preserved and can be deleted at your own discretion. - Easier-to-extend, modern, modular and robust codebase
- It doesn't care about starring the repository
There are still pieces missing like an appropriate wiki update.
Fansly Downloader NG is the go-to app for all your bulk media downloading needs. Download photos, videos, audio or any other media from Fansly. This powerful tool has got you covered! Say goodbye to the hassle of individually downloading each piece of media β now you can download them all or just some in one go.
- Bulk: Timeline, Messages, Collection
- Single Posts by post ID
- Easily update prior download folders
- App keeps itself up-to-date with fansly
- Compatible with Windows, Linux & MacOS
- Executable app only ships for Windows
- Separate media into sub-folders?
- Want to download previews?
- Downloads only unique content
- resulting in less bandwidth usage
- Open source, community driven project
π Configuration Settings in detail
π Detailed description on each of the components of this software
IMPORTANT: Starting with version 0.11.0, Fansly Downloader NG has migrated from SQLite to PostgreSQL for metadata storage. This is a breaking change that requires action before upgrading.
- v0.9.9 and earlier (2024-06-28): No metadata database - downloads tracked by filenames only
- v0.10.x (late 2024): SQLite metadata database introduced for better deduplication and tracking
- v0.11.0+ (current): PostgreSQL for higher performance and data reliability
The migration to PostgreSQL provides several critical improvements:
- Better Performance: Significantly faster queries and bulk operations on large datasets
- Superior Concurrency: True multi-user/multi-process support without database locking issues
- Network Support: Reliable operation with databases on network paths (NAS, SMB shares)
- Advanced Features: Better support for complex queries, transactions, and data integrity
-
Install PostgreSQL
- macOS:
brew install postgresql@17or download from postgresql.org - Linux:
sudo apt-get install postgresql postgresql-contribor equivalent for your distro - Windows: Download installer from postgresql.org
- macOS:
-
Create Database and User
# Start PostgreSQL service # macOS (Homebrew): brew services start postgresql@17 # Linux: sudo systemctl start postgresql # Windows: Service starts automatically after installation # Create database and user createdb fansly_metadata psql -d fansly_metadata -c "CREATE USER fansly_user WITH PASSWORD 'your_secure_password';" psql -d fansly_metadata -c "GRANT ALL PRIVILEGES ON DATABASE fansly_metadata TO fansly_user;" psql -d fansly_metadata -c "GRANT ALL ON SCHEMA public TO fansly_user;"
-
Migrate Existing Data (if upgrading from v0.10.x with SQLite)
Note: If you're upgrading from v0.9.x or earlier (before metadata tracking), skip this step - there's no SQLite database to migrate.
Use the provided migration script to transfer your existing SQLite metadata to PostgreSQL:
python scripts/migrate_to_postgres.py \ --sqlite-file metadata_db.sqlite3 \ --pg-host localhost \ --pg-database fansly_metadata \ --pg-user fansly_userThe script will:
- Create a backup of your SQLite database (with timestamp)
- Copy all tables and data to PostgreSQL
- Verify the migration completed successfully
- Optionally delete the SQLite file after successful migration (use
--delete-sqlite)
-
Update Configuration
Update your
config.iniwith PostgreSQL connection details. Use the following individual parameters in the[Options]section:[Options] pg_host = localhost pg_port = 5432 pg_database = fansly_metadata pg_user = fansly_user pg_password = your_secure_password pg_pool_size = 5 pg_max_overflow = 10 pg_pool_timeout = 30
There is NO backward compatibility with SQLite. Once you upgrade to v0.11.0+, you must use PostgreSQL. If you need to continue using SQLite, remain on v0.10.x releases.
For detailed migration instructions and troubleshooting, see the PostgreSQL Migration Guide.
NEW REQUIREMENT: Fansly Downloader NG now requires Node.js and specific JavaScript libraries for checkKey extraction and browser compliance detection.
Fansly's authentication system requires extracting a checkKey value from their JavaScript bundles. To do this reliably and securely, we use:
- acorn: Industry-standard JavaScript parser for AST (Abstract Syntax Tree) generation
- acorn-walk: AST traversal library to find specific code patterns
- JSPyBridge (Python
javascriptpackage): Required for Python-JavaScript communication
-
Install Node.js
Recommended: Use nvm (Node Version Manager) for easy version management:
# Install nvm (macOS/Linux) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash # Install Node.js (version specified in .nvmrc) nvm install nvm use
Alternative: Download and install directly from nodejs.org (LTS version recommended)
-
Install JavaScript Dependencies
# In the project directory npm install acorn acorn-walk -
Install JSPyBridge (Required - included in Poetry dependencies)
JSPyBridge is already included when you run
poetry install. This provides efficient Python-JavaScript communication for checkKey extraction.Note: If you installed manually with pip instead of Poetry, run:
pip install javascript
The project includes an .nvmrc file (currently set to v25.0.0) for consistent Node.js versions across environments. When using nvm:
# Automatically use the correct Node.js version
nvm useImportant: JSPyBridge detects and uses your local nvm installation if available, ensuring compatibility with the Node.js version specified in .nvmrc.
For more details, see CheckKey Extraction Documentation.
On Windows you can just download and run the executable version - skip the entire setup section and go directly to Quick Start.
If your operating system is not compatible with executable versions of Fansly Downloader NG (only Windows supported for .exe) or you want to use the Python sources directly, please download and extract or clone the repository and ensure that Python 3.12+ is installed on your system.
Note: This project uses Poetry for dependency management. Poetry automatically creates and manages virtual environments for you.
-
Install Poetry (if not already installed):
# Linux, macOS, Windows (WSL) curl -sSL https://install.python-poetry.org | python3 - # Or using pip (alternative method) pip install poetry
Note: You may need to add Poetry to your PATH. See Poetry installation docs for details.
-
Install Node.js and npm Dependencies:
Fansly Downloader NG requires Node.js for checkKey extraction from Fansly's JavaScript bundles.
Option A: Using nvm (Recommended)
# Install nvm (macOS/Linux) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash # Navigate to project directory cd fansly-downloader-ng # Install Node.js (version specified in .nvmrc) nvm install nvm use # Install npm dependencies npm install acorn acorn-walk
Option B: Using Node.js directly
# Download and install Node.js LTS from nodejs.org # Then navigate to project directory and install npm dependencies cd fansly-downloader-ng npm install acorn acorn-walk
For Windows users:
- Download Node.js installer from nodejs.org
- After installation, open PowerShell/CMD in the project directory
- Run:
npm install acorn acorn-walk
-
Install Python Dependencies:
# Install all dependencies (recommended - includes browser token extraction) poetry install --no-root # OR install with specific optional features: # With browser authentication support (extracts tokens from Chrome, Firefox, etc.) poetry install --no-root --with browser-auth # Without browser authentication (requires username/password login) poetry install --no-root
Note: The
javascriptpackage (JSPyBridge) is automatically installed by Poetry and provides efficient Python-JavaScript communication for checkKey extraction. -
Additional Platform Requirements:
Linux: You may need to install the Python
Tkintermodule separately:sudo apt-get install python3-tk
Windows/macOS: The
Tkintermodule is typically included in the Python installer.
# Run with Poetry
poetry run python fansly_downloader_ng.py
# Or activate the Poetry shell first, then run normally
poetry shell
python fansly_downloader_ng.pyInstall development and testing dependencies:
poetry install --no-root --with dev,typing,test,browser-authImportant: Raw Python code versions of Fansly Downloader NG do not receive automatic updates. If an update is available, you will be notified but need to manually download and set up the current repository again.
Follow these steps to quickly get started with either the Python or the Executable:
-
Download the latest version of Fansly Downloader NG by choosing one of the options below:
- Windows exclusive executable version -
Fansly Downloader NG.exe - Python code version -
fansly_downloader_ng.py
and extract the files from the zip folder.
- Windows exclusive executable version -
-
Choose your authentication method:
Option A: Browser Token Extraction (Recommended)
- Requires installing browser-auth support:
poetry install --no-root --with browser-auth - Ensure you have recently logged into your Fansly account and accessed the Fansly website using one of the following web browsers: Chrome, Firefox, Microsoft Edge, Brave, Opera, or Opera GX on Windows 10/11, macOS or Linux
- The application will automatically extract your authorization token from browser storage
- No credentials needed - tokens are extracted locally from your browser
Option B: Username/Password Login
-
Add your Fansly credentials to
config.ini:[Targeted Creator] username = your_fansly_account_username password = your_fansly_account_password
-
The application will automatically log in and obtain a token
-
Works without browser-auth dependency - just run
poetry install --no-root
- Requires installing browser-auth support:
-
Open and run the
Fansly Downloader NG.exefile by clicking on it or runpoetry run python fansly_downloader_ng.pyfrom a terminal. This will initiate the interactive setup tutorial for the configuration file calledconfig.ini. -
After values for the targeted creators Username, your Fansly account Authorization Token and your web browser's User-Agent are filled you're good to go π! See the manual set-up tutorial if anything could not be configured automatically.
Once you have completed the initial configuration of Fansly Downloader NG, for every future use case, you will only need to adapt the creator(s) in Targeted Creator > Username section in the config.ini using a text editor of your choice. Additional settings can also be found in the config.ini file, which are documented in the Wiki page.
Do you have any unanswered questions or want to know more about Fansly Downloader NG? Head over to the Wiki or check if your topic was mentioned in Discussions or Issues
- Q: "Is Fansly Downloader NG exclusive to Windows?"
- A: No, Fansly Downloader NG can be ran on Windows, MacOS or Linux. It's just that the executable version of the downloader, is currently only being distributed for the windows 10 & 11 operating systems. You can use Fansly Downloader NG from the raw Python sources on any other operating system and it'll behave the exact same as the Windows executable version.
- Q: "Is it possible to download Fansly files on a mobile device?"
- A: Unfortunately, downloading Fansly files on a mobile device is currently not supported by Fansly Downloader NG or any other available means.
- Q: "Why do some executables show detections on them in VirusTotal?"
- A: The Fansly Downloader NG executables are not digitally signed as software certificates are very expensive. Thus the executables tend to produce a lot of false positives (invalid detections). Antivirus providers can be mailed to update their detections but not all do care. If you're knowledgeable with the Python programming language you can decompile a PyInstaller executable such as Fansly Downloader NG using a tool like uncompyle6 - and assure yourself that no harmful code is included. Or you could just create your own PyInstaller executable.
- Q: "Could you add X feature or do X change?"
- A: I'm regrettably very limited on time and thus primarily do stuff I find useful myself. You can contribute code by opening a pull request
- Q: "Will you add any payment bypassing features to Fansly Downloader NG?"
- A: No, as the intention of this repository is not to harm Fansly or it's content creators.
- Q: "Is there a possibility of being banned?"
- A: While there are no guarantees, it's worth noting that among the 24.000+ previous users, there have been no reported incidents.
Please note that "Issue" tickets are reserved for reporting genuine or suspected bugs in the codebase of the downloader which require attention from the developer. They are not for general computer user problems.
Any kind of positive contribution is welcome! Please help the project improve by opening a pull request with your suggested changes!
A heartfelt thank you goes out to @liviaerxin for their invaluable contribution in providing the cross-platform package plyvel. Due to these builds Fansly downloader NG's initial interactive cross-platform setup has become a reality.
This project (including executables) is licensed under the GPL-3.0 License - see the LICENSE file for details.
"Fansly" or fansly.com is operated by Select Media LLC as stated on their "Contact" page. 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(referred to: "prof79" in the following) of this code is not responsible for the end users actions, no unlawful activities of any kind are being encouraged. Statements and processes described in this repository only represent best practice guidance aimed at fostering an effective software usage. The repository was written purely for educational purposes, in an entirely theoretical environment. Thus, any information is presented on the condition that the developer of this code shall not be held liable in no event to you or anyone else for any direct, special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, including without limitation, loss of profit, loss of use, savings or revenue, or the claims of third parties, whether the developer has advised of the possibility of such loss, however caused and on any theory of liability, arising out of or in connection with the possession, use or performance of this software. The material embodied in this repository is supplied to you "as-is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of fitness. This code does not bypass any paywalls & no end user information is collected during usage. Finally it is important to note that this GitHub repository is the sole branch maintained and owned by the developer and any third-party websites or entities, that might refer to or be referred from it are in no way affiliated with Fansly Downloader, either directly or indirectly. This disclaimer is preliminary and is subject to revision.
