Skip to content

9Mad-Max5/onlyfans-dl-2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OnlyFans Profile Downloader / Archiver v2

This tool downloads all photos/videos from OnlyFans profiles, creating a local archive.
You must be subscribed to the profile to download their content.

onlyfans-dl will create a directory named after the profile in the current working directory.
A subdirectory structure will be built depending on the options set.
Any existing media will be skipped, not redownloaded.
Content will be named as DATE_ID.EXT (e.g. 2021-04-17_123456.jpg)

The configurations-example.py need to be renamed to configurations.py and you need to enter you data accordingly.

Requires

Requires Python3 and 'requests': python -m pip install requests or Using pip directly: pip -r install requirements.txt

Features

  • Choose what type of content to download (photos, videos, posts, stories, messages, purchases, archived)
  • Choose to create subfolders for each of the above, or combine them all into one folder
  • Choose to sort posts with more than one photo into "albums" (subfolders)
  • Download everything, or only the last <integer> days of content
  • Specify multiple profiles at once or use "all" keyword to get subscriptions dynamically
  • Ignore short videos

Usage

First make sure to set your session variables in the script and configure your options.

./onlyfans-dl.py <profiles / all> <max age (optional)>

  • <profiles> - the usernames of profiles to download. Use "all" to get all currently subscribed profiles. With "all_subs" even inactive subs and there chats getting pulled.
  • <max age> - Optional: Only get posts from the last <integer> days (Messages/Paid not affected)
    • max age = 0 - sets max age to latest date from the filenames for each profile individually

Session Variables

You need your browser's user-agent, onlyfans session cookie, x-bc HTTP header, and user-id. Here's how to get them

  • Get your browser's user-agent here ipchicken You must update this every time your browser updates
  • Session Cookie
    • Login to OnlyFans as normal
    • Open the dev console Storage Inspector (SHIFT+F9 on FireFox). or the Application tab of Chrome DevTools
    • Click Cookies -> https://onlyfans.com
    • Copy the value of the sess cookie
  • x-bc and user-id
    • Login to OnlyFans, goto home page
    • Open dev console F12 -> Network tab (Ctrl+Shift+E in FireFox)
    • Click Headers sub-tab (default)
    • Click on one of the JSON elements (may need to refresh page) and look under request headers on the right

Those settings need to be set in the configuration.py. Duplicate configuration-example.py and set the variables accordingly.

ToDo

A post with a single photo and video shouldn't be considered an album.
Allow messages to be limited by age through a separate mechanism/function.

About

OnlyFans content downloader v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%