Skip to content

Easy-to-use fansly.com content scraping tool. Enjoy your Fansly content offline anytime, anywhere in the highest possible content resolution! Fully customizable to download in bulk or single: photos, videos & audio from the timeline, messages, collection & single posts.

License

Notifications You must be signed in to change notification settings

GeneralUltra758/fansly-scraper

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fansly Downloader NG: The Ultimate Content Downloading Tool

Downloads Latest Release

Compatible with Python 3.12+ Windows Linux macOS

Fansly Downloader NG Screenshot

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.ini not required to start the program anymore - a config.ini with all program defaults will be generated automatically
  • Support for minimal config.ini files - 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 to fansly_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.

✨ Features

πŸ“₯ Download Modes

  • Bulk: Timeline, Messages, Collection
  • Single Posts by post ID

♻️ Updates

  • Easily update prior download folders
  • App keeps itself up-to-date with fansly

πŸ–₯️ Cross-Platform Compatibility

  • Compatible with Windows, Linux & MacOS
  • Executable app only ships for Windows

βš™οΈ Customizability

  • Separate media into sub-folders?
  • Want to download previews?

πŸ”Ž Deduplication

  • Downloads only unique content
  • resulting in less bandwidth usage

πŸ’Έ Free of Charge

  • Open source, community driven project

πŸ“– Configuration Settings in detail

πŸ“‹ Detailed description on each of the components of this software

⚠️ Breaking Changes

PostgreSQL Migration (v0.11.0+)

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.

Database Evolution Timeline

  • 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

Why the Change?

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

Migration Requirements

PostgreSQL must be installed and configured before running v0.11.0+
  1. Install PostgreSQL

    • macOS: brew install postgresql@17 or download from postgresql.org
    • Linux: sudo apt-get install postgresql postgresql-contrib or equivalent for your distro
    • Windows: Download installer from postgresql.org
  2. 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;"
  3. 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_user

    The 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)
  4. Update Configuration

    Update your config.ini with 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

Backward Compatibility

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.

JavaScript Dependencies (Node.js/npm Required)

NEW REQUIREMENT: Fansly Downloader NG now requires Node.js and specific JavaScript libraries for checkKey extraction and browser compliance detection.

Why These Dependencies?

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 javascript package): Required for Python-JavaScript communication

Installation Requirements

  1. 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)

  2. Install JavaScript Dependencies

    # In the project directory
    npm install acorn acorn-walk
  3. 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

Version Management

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 use

Important: 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.

πŸ—οΈ Setup

On Windows you can just download and run the executable version - skip the entire setup section and go directly to Quick Start.

Python Environment

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.

Installation Steps

  1. 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.

  2. 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
  3. 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 javascript package (JSPyBridge) is automatically installed by Poetry and provides efficient Python-JavaScript communication for checkKey extraction.

  4. Additional Platform Requirements:

    Linux: You may need to install the Python Tkinter module separately:

    sudo apt-get install python3-tk

    Windows/macOS: The Tkinter module is typically included in the Python installer.

Running the Application

# 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.py

For Developers

Install development and testing dependencies:

poetry install --no-root --with dev,typing,test,browser-auth

Important: 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.

πŸš€ Quick Start

Follow these steps to quickly get started with either the Python or the Executable:

  1. Download the latest version of Fansly Downloader NG by choosing one of the options below:

    and extract the files from the zip folder.

  2. 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

  3. Open and run the Fansly Downloader NG.exe file by clicking on it or run poetry run python fansly_downloader_ng.py from a terminal. This will initiate the interactive setup tutorial for the configuration file called config.ini.

  4. 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.

πŸ€” FAQ

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.

🀝 Contributing to Fansly Downloader NG

Any kind of positive contribution is welcome! Please help the project improve by opening a pull request with your suggested changes!

Special Thanks

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.

πŸ›‘οΈ License

This project (including executables) is licensed under the GPL-3.0 License - see the LICENSE file for details.

Disclaimer

"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.

About

Easy-to-use fansly.com content scraping tool. Enjoy your Fansly content offline anytime, anywhere in the highest possible content resolution! Fully customizable to download in bulk or single: photos, videos & audio from the timeline, messages, collection & single posts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Other 0.1%