Compare commits

..

No commits in common. "master" and "OFDLV1.9.7" have entirely different histories.

45 changed files with 16365 additions and 930 deletions

View File

@ -1,48 +0,0 @@
name: Publish Docker image
on:
push:
tags:
- 'OFDLV*'
jobs:
docker:
name: Build and push Docker image to Gitea Registry
runs-on: ubuntu-latest
steps:
- name: Extract tag name and version
id: version
run: |
FULL_REF="${{ gitea.ref }}"
TAG="${FULL_REF##refs/tags/}"
VERSION="${TAG#OFDLV}"
echo "Tag: $TAG"
echo "Version: $VERSION"
echo "tag=$TAG" >> "$GITEA_OUTPUT"
echo "version=$VERSION" >> "$GITEA_OUTPUT"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
registry: git.ofdl.tools
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
git.ofdl.tools/sim0n00ps/of-dl:latest
git.ofdl.tools/sim0n00ps/of-dl:${{ steps.version.outputs.version }}
build-args: |
VERSION=${{ steps.version.outputs.version }}

View File

@ -1,36 +0,0 @@
name: Publish docs
on:
push:
tags:
- 'OFDLV*'
paths:
- 'docs/**'
- '.gitea/workflows/publish-docs.yml'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install MkDocs
run: |
pip install mkdocs-material
- name: Build site
run: |
mkdocs build --clean
- name: Deploy site
run: |
sudo rm -rf /var/www/mkdocs/*
sudo cp -r site/* /var/www/mkdocs/
sudo chown -R www-data:www-data /var/www/mkdocs/

5
.gitignore vendored
View File

@ -367,7 +367,4 @@ FodyWeavers.xsd
/OF DL/device_private_key /OF DL/device_private_key
# Allow node_modules inside custom actions # Allow node_modules inside custom actions
!.gitea-actions/**/node_modules/ !.gitea-actions/**/node_modules/
# venv
venv/

View File

@ -97,12 +97,6 @@ namespace OF_DL.Entities
[ToggleableConfig] [ToggleableConfig]
public bool IgnoreOwnMessages { get; set; } = false; public bool IgnoreOwnMessages { get; set; } = false;
[ToggleableConfig]
public bool DisableBrowserAuth { get; set; } = false;
[JsonConverter(typeof(StringEnumConverter))]
public VideoResolution DownloadVideoResolution { get; set; } = VideoResolution.source;
} }
public class CreatorConfig : IFileNameFormatConfig public class CreatorConfig : IFileNameFormatConfig

View File

@ -17,8 +17,6 @@ namespace OF_DL.Entities
bool DownloadVideos { get; set; } bool DownloadVideos { get; set; }
bool DownloadAudios { get; set; } bool DownloadAudios { get; set; }
VideoResolution DownloadVideoResolution { get; set; }
int? Timeout { get; set; } int? Timeout { get; set; }
bool FolderPerPaidPost { get; set; } bool FolderPerPaidPost { get; set; }
bool FolderPerPost { get; set; } bool FolderPerPost { get; set; }

View File

@ -1,9 +0,0 @@
using Newtonsoft.Json;
namespace OF_DL.Entities;
public class LatestReleaseAPIResponse
{
[JsonProperty(PropertyName = "tag_name")]
public string TagName { get; set; } = "";
}

View File

@ -150,10 +150,10 @@ namespace OF_DL.Entities.Post
public class VideoSources public class VideoSources
{ {
[JsonProperty("720")] [JsonProperty("720")]
public string _720 { get; set; } public object _720 { get; set; }
[JsonProperty("240")] [JsonProperty("240")]
public string _240 { get; set; } public object _240 { get; set; }
} }
public class Dash public class Dash
{ {

View File

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OF_DL.Enumerations
{
public enum VideoResolution
{
_240,
_720,
source
}
}

View File

@ -9,7 +9,6 @@ using OF_DL.Entities.Post;
using OF_DL.Entities.Purchased; using OF_DL.Entities.Purchased;
using OF_DL.Entities.Stories; using OF_DL.Entities.Stories;
using OF_DL.Entities.Streams; using OF_DL.Entities.Streams;
using OF_DL.Enumerations;
using OF_DL.Enumurations; using OF_DL.Enumurations;
using Serilog; using Serilog;
using Spectre.Console; using Spectre.Console;
@ -27,7 +26,6 @@ public class APIHelper : IAPIHelper
{ {
private static readonly JsonSerializerSettings m_JsonSerializerSettings; private static readonly JsonSerializerSettings m_JsonSerializerSettings;
private readonly IDBHelper m_DBHelper; private readonly IDBHelper m_DBHelper;
private readonly IDownloadConfig downloadConfig;
private readonly Auth auth; private readonly Auth auth;
private static DateTime? cachedDynamicRulesExpiration; private static DateTime? cachedDynamicRulesExpiration;
private static DynamicRules? cachedDynamicRules; private static DynamicRules? cachedDynamicRules;
@ -44,7 +42,6 @@ public class APIHelper : IAPIHelper
{ {
this.auth = auth; this.auth = auth;
m_DBHelper = new DBHelper(downloadConfig); m_DBHelper = new DBHelper(downloadConfig);
this.downloadConfig = downloadConfig;
} }
@ -1133,51 +1130,29 @@ public class APIHelper : IAPIHelper
} }
if (medium.canView && medium.files?.drm == null) if (medium.canView && medium.files?.drm == null)
{ {
switch (downloadConfig.DownloadVideoResolution) if (medium.files!.full != null && !string.IsNullOrEmpty(medium.files!.full.url))
{ {
case VideoResolution.source: if (!medium.files!.full.url.Contains("upload"))
if (medium.files!.full != null && !string.IsNullOrEmpty(medium.files!.full.url)) {
if (!singlePostCollection.SinglePosts.ContainsKey(medium.id))
{ {
if (!medium.files!.full.url.Contains("upload")) await m_DBHelper.AddMedia(folder, medium.id, singlePost.id, medium.files!.full.url, null, null, null, "Posts", medium.type == "photo" ? "Images" : (medium.type == "video" || medium.type == "gif" ? "Videos" : (medium.type == "audio" ? "Audios" : null)), postPreviewIds.Contains((long)medium.id) ? true : false, false, null);
{ singlePostCollection.SinglePosts.Add(medium.id, medium.files!.full.url);
if (!singlePostCollection.SinglePosts.ContainsKey(medium.id)) singlePostCollection.SinglePostMedia.Add(medium);
{
await m_DBHelper.AddMedia(folder, medium.id, singlePost.id, medium.files!.full.url, null, null, null, "Posts", medium.type == "photo" ? "Images" : (medium.type == "video" || medium.type == "gif" ? "Videos" : (medium.type == "audio" ? "Audios" : null)), postPreviewIds.Contains((long)medium.id) ? true : false, false, null);
singlePostCollection.SinglePosts.Add(medium.id, medium.files!.full.url);
singlePostCollection.SinglePostMedia.Add(medium);
}
}
} }
break; }
case VideoResolution._240: }
if(medium.videoSources != null) else if (medium.files.preview != null && medium.files!.full == null)
{
if (!medium.files.preview.url.Contains("upload"))
{
if (!singlePostCollection.SinglePosts.ContainsKey(medium.id))
{ {
if (!string.IsNullOrEmpty(medium.videoSources._240)) await m_DBHelper.AddMedia(folder, medium.id, singlePost.id, medium.files.preview.url, null, null, null, "Posts", medium.type == "photo" ? "Images" : (medium.type == "video" || medium.type == "gif" ? "Videos" : (medium.type == "audio" ? "Audios" : null)), postPreviewIds.Contains((long)medium.id) ? true : false, false, null);
{ singlePostCollection.SinglePosts.Add(medium.id, medium.files.preview.url);
if (!singlePostCollection.SinglePosts.ContainsKey(medium.id)) singlePostCollection.SinglePostMedia.Add(medium);
{
await m_DBHelper.AddMedia(folder, medium.id, singlePost.id, medium.videoSources._240, null, null, null, "Posts", medium.type == "photo" ? "Images" : (medium.type == "video" || medium.type == "gif" ? "Videos" : (medium.type == "audio" ? "Audios" : null)), postPreviewIds.Contains((long)medium.id) ? true : false, false, null);
singlePostCollection.SinglePosts.Add(medium.id, medium.videoSources._240);
singlePostCollection.SinglePostMedia.Add(medium);
}
}
} }
break; }
case VideoResolution._720:
if (medium.videoSources != null)
{
if (!string.IsNullOrEmpty(medium.videoSources._720))
{
if (!singlePostCollection.SinglePosts.ContainsKey(medium.id))
{
await m_DBHelper.AddMedia(folder, medium.id, singlePost.id, medium.videoSources._720, null, null, null, "Posts", medium.type == "photo" ? "Images" : (medium.type == "video" || medium.type == "gif" ? "Videos" : (medium.type == "audio" ? "Audios" : null)), postPreviewIds.Contains((long)medium.id) ? true : false, false, null);
singlePostCollection.SinglePosts.Add(medium.id, medium.videoSources._720);
singlePostCollection.SinglePostMedia.Add(medium);
}
}
}
break;
} }
} }
else if (medium.canView && medium.files != null && medium.files.drm != null) else if (medium.canView && medium.files != null && medium.files.drm != null)
@ -1192,18 +1167,6 @@ public class APIHelper : IAPIHelper
} }
} }
} }
else if (medium.files.preview != null && medium.files!.full == null)
{
if (!medium.files.preview.url.Contains("upload"))
{
if (!singlePostCollection.SinglePosts.ContainsKey(medium.id))
{
await m_DBHelper.AddMedia(folder, medium.id, singlePost.id, medium.files.preview.url, null, null, null, "Posts", medium.type == "photo" ? "Images" : (medium.type == "video" || medium.type == "gif" ? "Videos" : (medium.type == "audio" ? "Audios" : null)), postPreviewIds.Contains((long)medium.id) ? true : false, false, null);
singlePostCollection.SinglePosts.Add(medium.id, medium.files.preview.url);
singlePostCollection.SinglePostMedia.Add(medium);
}
}
}
} }
} }
} }
@ -2844,7 +2807,7 @@ public class APIHelper : IAPIHelper
try try
{ {
HttpClient client = new HttpClient(); HttpClient client = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "https://git.ofdl.tools/sim0n00ps/dynamic-rules/raw/branch/main/rules.json"); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "https://raw.githubusercontent.com/deviint/onlyfans-dynamic-rules/main/dynamicRules.json");
using var response = client.Send(request); using var response = client.Send(request);
if (!response.IsSuccessStatusCode) if (!response.IsSuccessStatusCode)

View File

@ -12,7 +12,6 @@ using OF_DL.Enumerations;
using OF_DL.Utils; using OF_DL.Utils;
using Org.BouncyCastle.Asn1.Tsp; using Org.BouncyCastle.Asn1.Tsp;
using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Asn1.X509;
using Org.BouncyCastle.Tsp;
using Serilog; using Serilog;
using Spectre.Console; using Spectre.Console;
using System; using System;
@ -26,7 +25,6 @@ using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml.Linq;
using static OF_DL.Entities.Lists.UserList; using static OF_DL.Entities.Lists.UserList;
using static OF_DL.Entities.Messages.Messages; using static OF_DL.Entities.Messages.Messages;
@ -604,33 +602,9 @@ public class DownloadHelper : IDownloadHelper
decKey = decryptionKey.Substring(pos1 + 1); decKey = decryptionKey.Substring(pos1 + 1);
} }
int streamIndex = 0;
string tempFilename = $"{folder}{path}/{filename}_source.mp4"; string tempFilename = $"{folder}{path}/{filename}_source.mp4";
//int? streamIndex = await GetVideoStreamIndexFromMpd(url, policy, signature, kvp, downloadConfig.DownloadVideoResolution); string parameters = $"-cenc_decryption_key {decKey} -headers \"Cookie:CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {sess} Origin: https://onlyfans.com Referer: https://onlyfans.com User-Agent: {user_agent}\" -y -i \"{url}\" -codec copy \"{tempFilename}\"";
//if (streamIndex == null)
// throw new Exception($"Could not find video stream for resolution {downloadConfig.DownloadVideoResolution}");
//string tempFilename;
//switch (downloadConfig.DownloadVideoResolution)
//{
// case VideoResolution.source:
// tempFilename = $"{folder}{path}/{filename}_source.mp4";
// break;
// case VideoResolution._240:
// tempFilename = $"{folder}{path}/{filename}_240.mp4";
// break;
// case VideoResolution._720:
// tempFilename = $"{folder}{path}/{filename}_720.mp4";
// break;
// default:
// tempFilename = $"{folder}{path}/{filename}_source.mp4";
// break;
//}
string parameters = $"-cenc_decryption_key {decKey} -headers \"Cookie:CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {sess} Origin: https://onlyfans.com Referer: https://onlyfans.com User-Agent: {user_agent}\" -y -i \"{url}\" -map 0:v:{streamIndex} -map 0:a? -codec copy \"{tempFilename}\"";
Log.Debug($"Calling FFMPEG with Parameters: {parameters}"); Log.Debug($"Calling FFMPEG with Parameters: {parameters}");
@ -1813,45 +1787,4 @@ public class DownloadHelper : IDownloadHelper
return false; return false;
} }
#endregion #endregion
private async Task <int?> GetVideoStreamIndexFromMpd(string mpdUrl, string policy, string signature, string kvp, VideoResolution resolution)
{
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Get, mpdUrl);
request.Headers.Add("user-agent", auth.USER_AGENT);
request.Headers.Add("Accept", "*/*");
request.Headers.Add("Cookie", $"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {auth.COOKIE};");
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
XDocument doc = XDocument.Parse(body);
XNamespace ns = "urn:mpeg:dash:schema:mpd:2011";
XNamespace cenc = "urn:mpeg:cenc:2013";
var videoAdaptationSet = doc
.Descendants(ns + "AdaptationSet")
.FirstOrDefault(e => (string)e.Attribute("mimeType") == "video/mp4");
if (videoAdaptationSet == null)
return null;
string targetHeight = resolution switch
{
VideoResolution._240 => "240",
VideoResolution._720 => "720",
VideoResolution.source => "1280",
_ => throw new ArgumentOutOfRangeException(nameof(resolution))
};
var representations = videoAdaptationSet.Elements(ns + "Representation").ToList();
for (int i = 0; i < representations.Count; i++)
{
if ((string)representations[i].Attribute("height") == targetHeight)
return i; // this is the index FFmpeg will use for `-map 0:v:{i}`
}
}
return null;
}
} }

View File

@ -1,52 +0,0 @@
using Newtonsoft.Json;
using OF_DL.Entities;
using Serilog;
namespace OF_DL.Helpers;
public static class VersionHelper
{
public static string? GetLatestReleaseTag()
{
Log.Debug("Calling GetLatestReleaseTag");
try
{
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Get, "https://git.ofdl.tools/api/v1/repos/sim0n00ps/OF-DL/releases/latest");
using var response = client.Send(request);
if (!response.IsSuccessStatusCode)
{
Log.Debug("GetLatestReleaseTag did not return a Success Status Code");
return null;
}
var body = response.Content.ReadAsStringAsync().Result;
Log.Debug("GetLatestReleaseTag API Response: ");
Log.Debug(body);
var versionCheckResponse = JsonConvert.DeserializeObject<LatestReleaseAPIResponse>(body);
if (versionCheckResponse == null || versionCheckResponse.TagName == "")
{
Log.Debug("GetLatestReleaseTag did not return a valid tag name");
return null;
}
return versionCheckResponse.TagName;
}
catch (Exception ex)
{
Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace);
Log.Error("Exception caught: {0}\n\nStackTrace: {1}", ex.Message, ex.StackTrace);
if (ex.InnerException != null)
{
Console.WriteLine("\nInner Exception:");
Console.WriteLine("Exception caught: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace);
Log.Error("Inner Exception: {0}\n\nStackTrace: {1}", ex.InnerException.Message, ex.InnerException.StackTrace);
}
}
return null;
}
}

View File

@ -19,6 +19,7 @@
<PackageReference Include="HtmlAgilityPack" Version="1.12.0" /> <PackageReference Include="HtmlAgilityPack" Version="1.12.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.3" /> <PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Octokit" Version="14.0.0" />
<PackageReference Include="protobuf-net" Version="3.2.46" /> <PackageReference Include="protobuf-net" Version="3.2.46" />
<PackageReference Include="PuppeteerSharp" Version="20.1.3" /> <PackageReference Include="PuppeteerSharp" Version="20.1.3" />
<PackageReference Include="Serilog" Version="4.2.0" /> <PackageReference Include="Serilog" Version="4.2.0" />

View File

@ -9,6 +9,7 @@ using OF_DL.Entities.Streams;
using OF_DL.Enumerations; using OF_DL.Enumerations;
using OF_DL.Enumurations; using OF_DL.Enumurations;
using OF_DL.Helpers; using OF_DL.Helpers;
using Octokit;
using Serilog; using Serilog;
using Serilog.Core; using Serilog.Core;
using Serilog.Events; using Serilog.Events;
@ -68,7 +69,7 @@ public class Program
AnsiConsole.MarkupLine($"[yellow]In the new window that has opened, please log in to your OF account. Do not close the window or tab. Do not navigate away from the page.[/]\n"); AnsiConsole.MarkupLine($"[yellow]In the new window that has opened, please log in to your OF account. Do not close the window or tab. Do not navigate away from the page.[/]\n");
AnsiConsole.MarkupLine($"[yellow]Note: Some users have reported that \"Sign in with Google\" has not been working with the new authentication method.[/]"); AnsiConsole.MarkupLine($"[yellow]Note: Some users have reported that \"Sign in with Google\" has not been working with the new authentication method.[/]");
AnsiConsole.MarkupLine($"[yellow]If you use this method or encounter other issues while logging in, use one of the legacy authentication methods documented here:[/]"); AnsiConsole.MarkupLine($"[yellow]If you use this method or encounter other issues while logging in, use one of the legacy authentication methods documented here:[/]");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]"); AnsiConsole.MarkupLine($"[link]https://sim0n00ps.github.io/OF-DL/docs/config/auth#legacy-methods[/]");
} }
} }
auth = await getAuthTask; auth = await getAuthTask;
@ -78,7 +79,7 @@ public class Program
AnsiConsole.MarkupLine($"\n[red]Authentication failed. Be sure to log into to OF using the new window that opened automatically.[/]"); AnsiConsole.MarkupLine($"\n[red]Authentication failed. Be sure to log into to OF using the new window that opened automatically.[/]");
AnsiConsole.MarkupLine($"[red]The window will close automatically when the authentication process is finished.[/]"); AnsiConsole.MarkupLine($"[red]The window will close automatically when the authentication process is finished.[/]");
AnsiConsole.MarkupLine($"[red]If the problem persists, you may want to try using a legacy authentication method documented here:[/]\n"); AnsiConsole.MarkupLine($"[red]If the problem persists, you may want to try using a legacy authentication method documented here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]"); AnsiConsole.MarkupLine($"[link]https://sim0n00ps.github.io/OF-DL/docs/config/auth#legacy-methods[/]\n");
AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]"); AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]");
Log.Error(e, "auth invalid after attempt to get auth from browser"); Log.Error(e, "auth invalid after attempt to get auth from browser");
@ -90,7 +91,7 @@ public class Program
AnsiConsole.MarkupLine($"\n[red]Authentication failed. Be sure to log into to OF using the new window that opened automatically.[/]"); AnsiConsole.MarkupLine($"\n[red]Authentication failed. Be sure to log into to OF using the new window that opened automatically.[/]");
AnsiConsole.MarkupLine($"[red]The window will close automatically when the authentication process is finished.[/]"); AnsiConsole.MarkupLine($"[red]The window will close automatically when the authentication process is finished.[/]");
AnsiConsole.MarkupLine($"[red]If the problem persists, you may want to try using a legacy authentication method documented here:[/]\n"); AnsiConsole.MarkupLine($"[red]If the problem persists, you may want to try using a legacy authentication method documented here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]"); AnsiConsole.MarkupLine($"[link]https://sim0n00ps.github.io/OF-DL/docs/config/auth#legacy-methods[/]\n");
AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]"); AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]");
Log.Error("auth invalid after attempt to get auth from browser"); Log.Error("auth invalid after attempt to get auth from browser");
@ -160,7 +161,6 @@ public class Program
hoconConfig.AppendLine($" DownloadDateSelection = \"{jsonConfig.DownloadDateSelection.ToString().ToLower()}\""); hoconConfig.AppendLine($" DownloadDateSelection = \"{jsonConfig.DownloadDateSelection.ToString().ToLower()}\"");
hoconConfig.AppendLine($" CustomDate = \"{jsonConfig.CustomDate?.ToString("yyyy-MM-dd")}\""); hoconConfig.AppendLine($" CustomDate = \"{jsonConfig.CustomDate?.ToString("yyyy-MM-dd")}\"");
hoconConfig.AppendLine($" ShowScrapeSize = {jsonConfig.ShowScrapeSize.ToString().ToLower()}"); hoconConfig.AppendLine($" ShowScrapeSize = {jsonConfig.ShowScrapeSize.ToString().ToLower()}");
hoconConfig.AppendLine($" DownloadVideoResolution = \"{(jsonConfig.DownloadVideoResolution == VideoResolution.source ? "source" : jsonConfig.DownloadVideoResolution.ToString().TrimStart('_'))}\"");
hoconConfig.AppendLine("}"); hoconConfig.AppendLine("}");
hoconConfig.AppendLine("# File Settings"); hoconConfig.AppendLine("# File Settings");
@ -251,9 +251,6 @@ public class Program
config = new Entities.Config config = new Entities.Config
{ {
//Auth
DisableBrowserAuth = hoconConfig.GetBoolean("DisableBrowserAuth"),
// FFmpeg Settings // FFmpeg Settings
FFmpegPath = hoconConfig.GetString("External.FFmpegPath"), FFmpegPath = hoconConfig.GetString("External.FFmpegPath"),
@ -280,10 +277,9 @@ public class Program
DownloadDateSelection = Enum.Parse<DownloadDateSelection>(hoconConfig.GetString("Download.DownloadDateSelection"), true), DownloadDateSelection = Enum.Parse<DownloadDateSelection>(hoconConfig.GetString("Download.DownloadDateSelection"), true),
CustomDate = !string.IsNullOrWhiteSpace(hoconConfig.GetString("Download.CustomDate")) ? DateTime.Parse(hoconConfig.GetString("Download.CustomDate")) : null, CustomDate = !string.IsNullOrWhiteSpace(hoconConfig.GetString("Download.CustomDate")) ? DateTime.Parse(hoconConfig.GetString("Download.CustomDate")) : null,
ShowScrapeSize = hoconConfig.GetBoolean("Download.ShowScrapeSize"), ShowScrapeSize = hoconConfig.GetBoolean("Download.ShowScrapeSize"),
DownloadVideoResolution = ParseVideoResolution(hoconConfig.GetString("Download.DownloadVideoResolution", "source")),
// File Settings // File Settings
PaidPostFileNameFormat = hoconConfig.GetString("File.PaidPostFileNameFormat"), PaidPostFileNameFormat = hoconConfig.GetString("File.PaidPostFileNameFormat"),
PostFileNameFormat = hoconConfig.GetString("File.PostFileNameFormat"), PostFileNameFormat = hoconConfig.GetString("File.PostFileNameFormat"),
PaidMessageFileNameFormat = hoconConfig.GetString("File.PaidMessageFileNameFormat"), PaidMessageFileNameFormat = hoconConfig.GetString("File.PaidMessageFileNameFormat"),
MessageFileNameFormat = hoconConfig.GetString("File.MessageFileNameFormat"), MessageFileNameFormat = hoconConfig.GetString("File.MessageFileNameFormat"),
@ -367,8 +363,6 @@ public class Program
{ {
Entities.Config jsonConfig = new Entities.Config(); Entities.Config jsonConfig = new Entities.Config();
var hoconConfig = new StringBuilder(); var hoconConfig = new StringBuilder();
hoconConfig.AppendLine("# Auth");
hoconConfig.AppendLine($"DisableBrowserAuth = {jsonConfig.DisableBrowserAuth.ToString().ToLower()}");
hoconConfig.AppendLine("# External Tools"); hoconConfig.AppendLine("# External Tools");
hoconConfig.AppendLine("External {"); hoconConfig.AppendLine("External {");
hoconConfig.AppendLine($" FFmpegPath = \"{jsonConfig.FFmpegPath}\""); hoconConfig.AppendLine($" FFmpegPath = \"{jsonConfig.FFmpegPath}\"");
@ -400,7 +394,6 @@ public class Program
hoconConfig.AppendLine($" DownloadDateSelection = \"{jsonConfig.DownloadDateSelection.ToString().ToLower()}\""); hoconConfig.AppendLine($" DownloadDateSelection = \"{jsonConfig.DownloadDateSelection.ToString().ToLower()}\"");
hoconConfig.AppendLine($" CustomDate = \"{jsonConfig.CustomDate?.ToString("yyyy-MM-dd")}\""); hoconConfig.AppendLine($" CustomDate = \"{jsonConfig.CustomDate?.ToString("yyyy-MM-dd")}\"");
hoconConfig.AppendLine($" ShowScrapeSize = {jsonConfig.ShowScrapeSize.ToString().ToLower()}"); hoconConfig.AppendLine($" ShowScrapeSize = {jsonConfig.ShowScrapeSize.ToString().ToLower()}");
hoconConfig.AppendLine($" DownloadVideoResolution = \"{(jsonConfig.DownloadVideoResolution == VideoResolution.source ? "source" : jsonConfig.DownloadVideoResolution.ToString().TrimStart('_'))}\"");
hoconConfig.AppendLine("}"); hoconConfig.AppendLine("}");
hoconConfig.AppendLine("# File Settings"); hoconConfig.AppendLine("# File Settings");
@ -514,42 +507,37 @@ public class Program
} }
} }
try try
{ {
// Only run the version check if not in DEBUG mode // Only run the version check if not in DEBUG mode
#if !DEBUG #if !DEBUG
Version localVersion = Assembly.GetEntryAssembly()?.GetName().Version; //Only tested with numeric values. Version localVersion = Assembly.GetEntryAssembly()?.GetName().Version; //Only tested with numeric values.
String? latestReleaseTag = VersionHelper.GetLatestReleaseTag();
if (latestReleaseTag == null) // Get all releases from GitHub
{ GitHubClient client = new GitHubClient(new ProductHeaderValue("SomeName"));
AnsiConsole.Markup("[yellow]Failed to verify that OF-DL is up-to-date.\n[/]"); IReadOnlyList<Release> releases = await client.Repository.Release.GetAll("sim0n00ps", "OF-DL");
Log.Error("Failed to get the latest release tag.");
}
else
{
Version latestGiteaRelease = new Version(latestReleaseTag.Replace("OFDLV", ""));
// Compare the Versions // Setup the versions
int versionComparison = localVersion.CompareTo(latestGiteaRelease); Version latestGitHubVersion = new Version(releases[0].TagName.Replace("OFDLV", ""));
if (versionComparison < 0)
{
// The version on GitHub is more up to date than this local release.
AnsiConsole.Markup("[red]You are running OF-DL version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}\n[/]");
AnsiConsole.Markup("[red]Please update to the current release, " + $"{latestGiteaRelease.Major}.{latestGiteaRelease.Minor}.{latestGiteaRelease.Build}: [link]https://git.ofdl.tools/sim0n00ps/OF-DL/releases[/]\n[/]");
Log.Debug("Detected outdated client running version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}");
Log.Debug("Latest release version " + $"{latestGiteaRelease.Major}.{latestGiteaRelease.Minor}.{latestGiteaRelease.Build}");
}
else
{
// This local version is greater than the release version on GitHub.
AnsiConsole.Markup("[green]You are running OF-DL version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}\n[/]");
AnsiConsole.Markup("[green]Latest Release version: " + $"{latestGiteaRelease.Major}.{latestGiteaRelease.Minor}.{latestGiteaRelease.Build}\n[/]");
Log.Debug("Detected client running version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}");
Log.Debug("Latest release version " + $"{latestGiteaRelease.Major}.{latestGiteaRelease.Minor}.{latestGiteaRelease.Build}");
}
}
// Compare the Versions
int versionComparison = localVersion.CompareTo(latestGitHubVersion);
if (versionComparison < 0)
{
// The version on GitHub is more up to date than this local release.
AnsiConsole.Markup("[red]You are running OF-DL version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}\n[/]");
AnsiConsole.Markup("[red]Please update to the current release on GitHub, " + $"{latestGitHubVersion.Major}.{latestGitHubVersion.Minor}.{latestGitHubVersion.Build}: {releases[0].HtmlUrl}\n[/]");
Log.Debug("Detected outdated client running version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}");
Log.Debug("Latest GitHub release version " + $"{latestGitHubVersion.Major}.{latestGitHubVersion.Minor}.{latestGitHubVersion.Build}");
}
else
{
// This local version is greater than the release version on GitHub.
AnsiConsole.Markup("[green]You are running OF-DL version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}\n[/]");
AnsiConsole.Markup("[green]Latest GitHub Release version: " + $"{latestGitHubVersion.Major}.{latestGitHubVersion.Minor}.{latestGitHubVersion.Build}\n[/]");
Log.Debug("Detected client running version " + $"{localVersion.Major}.{localVersion.Minor}.{localVersion.Build}");
Log.Debug("Latest GitHub release version " + $"{latestGitHubVersion.Major}.{latestGitHubVersion.Minor}.{latestGitHubVersion.Build}");
}
#else #else
AnsiConsole.Markup("[yellow]Running in Debug/Local mode. Version check skipped.\n[/]"); AnsiConsole.Markup("[yellow]Running in Debug/Local mode. Version check skipped.\n[/]");
Log.Debug("Running in Debug/Local mode. Version check skipped."); Log.Debug("Running in Debug/Local mode. Version check skipped.");
@ -562,8 +550,7 @@ public class Program
Log.Error("Error checking latest release on GitHub.", e.Message); Log.Error("Error checking latest release on GitHub.", e.Message);
} }
if (File.Exists("auth.json"))
if (File.Exists("auth.json"))
{ {
AnsiConsole.Markup("[green]auth.json located successfully!\n[/]"); AnsiConsole.Markup("[green]auth.json located successfully!\n[/]");
Log.Debug("Auth file found"); Log.Debug("Auth file found");
@ -575,39 +562,22 @@ public class Program
catch (Exception _) catch (Exception _)
{ {
Log.Information("Auth file found but could not be deserialized"); Log.Information("Auth file found but could not be deserialized");
if (!config!.DisableBrowserAuth) Log.Debug("Deleting auth.json");
{ File.Delete("auth.json");
Log.Debug("Deleting auth.json");
File.Delete("auth.json");
}
if (cliNonInteractive) if (cliNonInteractive)
{ {
AnsiConsole.MarkupLine($"\n[red]auth.json has invalid JSON syntax. The file can be generated automatically when OF-DL is run in the standard, interactive mode.[/]\n"); AnsiConsole.MarkupLine($"\n[red]auth.json has invalid JSON syntax. The file can be generated automatically when OF-DL is run in the standard, interactive mode.[/]\n");
AnsiConsole.MarkupLine($"[red]You may also want to try using the browser extension which is documented here:[/]\n"); AnsiConsole.MarkupLine($"[red]You may also want to try using the browser extension which is documented here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]"); AnsiConsole.MarkupLine($"[link]https://sim0n00ps.github.io/OF-DL/docs/config/auth#browser-extension[/]\n");
AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]"); AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]");
Console.ReadKey(); Console.ReadKey();
Environment.Exit(2); Environment.Exit(2);
} }
await LoadAuthFromBrowser();
if (!config!.DisableBrowserAuth) }
{
await LoadAuthFromBrowser();
}
else
{
AnsiConsole.MarkupLine($"\n[red]auth.json is missing. The file can be generated automatically when OF-DL is run in the standard, interactive mode.[/]\n");
AnsiConsole.MarkupLine($"[red]You may also want to try using the browser extension which is documented here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]");
AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]");
Console.ReadKey();
Environment.Exit(2);
}
}
} }
else else
{ {
@ -615,27 +585,14 @@ public class Program
{ {
AnsiConsole.MarkupLine($"\n[red]auth.json is missing. The file can be generated automatically when OF-DL is run in the standard, interactive mode.[/]\n"); AnsiConsole.MarkupLine($"\n[red]auth.json is missing. The file can be generated automatically when OF-DL is run in the standard, interactive mode.[/]\n");
AnsiConsole.MarkupLine($"[red]You may also want to try using the browser extension which is documented here:[/]\n"); AnsiConsole.MarkupLine($"[red]You may also want to try using the browser extension which is documented here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]"); AnsiConsole.MarkupLine($"[link]https://sim0n00ps.github.io/OF-DL/docs/config/auth#browser-extension[/]\n");
AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]"); AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]");
Console.ReadKey(); Console.ReadKey();
Environment.Exit(2); Environment.Exit(2);
} }
if (!config!.DisableBrowserAuth) await LoadAuthFromBrowser();
{
await LoadAuthFromBrowser();
}
else
{
AnsiConsole.MarkupLine($"\n[red]auth.json is missing. The file can be generated automatically when OF-DL is run in the standard, interactive mode.[/]\n");
AnsiConsole.MarkupLine($"[red]You may also want to try using the browser extension which is documented here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth/#legacy-methods[/]");
AnsiConsole.MarkupLine($"[red]Press any key to exit.[/]");
Console.ReadKey();
Environment.Exit(2);
}
} }
//Added to stop cookie being filled with un-needed headers //Added to stop cookie being filled with un-needed headers
@ -789,23 +746,20 @@ public class Program
Log.Error("Auth failed"); Log.Error("Auth failed");
auth = null; auth = null;
if (!config!.DisableBrowserAuth) if (File.Exists("auth.json"))
{
if (File.Exists("auth.json"))
{
File.Delete("auth.json");
}
}
if (!cliNonInteractive && !config!.DisableBrowserAuth)
{ {
await LoadAuthFromBrowser(); File.Delete("auth.json");
} }
if (!cliNonInteractive)
{
await LoadAuthFromBrowser();
}
if (auth == null) if (auth == null)
{ {
AnsiConsole.MarkupLine($"\n[red]Auth failed. Please try again or use other authentication methods detailed here:[/]\n"); AnsiConsole.MarkupLine($"\n[red]Auth failed. Please try again or use other authentication methods detailed here:[/]\n");
AnsiConsole.MarkupLine($"[link]https://docs.ofdl.tools/config/auth[/]\n"); AnsiConsole.MarkupLine($"[link]https://sim0n00ps.github.io/OF-DL/docs/config/auth[/]\n");
Console.ReadKey(); Console.ReadKey();
Environment.Exit(2); Environment.Exit(2);
} }
@ -1685,7 +1639,7 @@ public class Program
{ {
archived = await downloadContext.ApiHelper.GetArchived($"/users/{user.Value}/posts", path, downloadContext.DownloadConfig!, ctx); archived = await downloadContext.ApiHelper.GetArchived($"/users/{user.Value}/posts", path, downloadContext.DownloadConfig!, ctx);
}); });
int oldArchivedCount = 0; int oldArchivedCount = 0;
int newArchivedCount = 0; int newArchivedCount = 0;
if (archived != null && archived.ArchivedPosts.Count > 0) if (archived != null && archived.ArchivedPosts.Count > 0)
@ -1818,7 +1772,7 @@ public class Program
{ {
posts = await downloadContext.ApiHelper.GetPosts($"/users/{user.Value}/posts", path, downloadContext.DownloadConfig!, paid_post_ids, ctx); posts = await downloadContext.ApiHelper.GetPosts($"/users/{user.Value}/posts", path, downloadContext.DownloadConfig!, paid_post_ids, ctx);
}); });
int oldPostCount = 0; int oldPostCount = 0;
int newPostCount = 0; int newPostCount = 0;
if (posts == null || posts.Posts.Count <= 0) if (posts == null || posts.Posts.Count <= 0)
@ -2340,7 +2294,7 @@ public class Program
{ {
streams = await downloadContext.ApiHelper.GetStreams($"/users/{user.Value}/posts/streams", path, downloadContext.DownloadConfig!, paid_post_ids, ctx); streams = await downloadContext.ApiHelper.GetStreams($"/users/{user.Value}/posts/streams", path, downloadContext.DownloadConfig!, paid_post_ids, ctx);
}); });
int oldStreamsCount = 0; int oldStreamsCount = 0;
int newStreamsCount = 0; int newStreamsCount = 0;
if (streams == null || streams.Streams.Count <= 0) if (streams == null || streams.Streams.Count <= 0)
@ -2871,8 +2825,6 @@ public class Program
} }
var hoconConfig = new StringBuilder(); var hoconConfig = new StringBuilder();
hoconConfig.AppendLine("# Auth");
hoconConfig.AppendLine($"DisableBrowserAuth = {newConfig.DisableBrowserAuth.ToString().ToLower()}");
hoconConfig.AppendLine("# External Tools"); hoconConfig.AppendLine("# External Tools");
hoconConfig.AppendLine("External {"); hoconConfig.AppendLine("External {");
hoconConfig.AppendLine($" FFmpegPath = \"{newConfig.FFmpegPath}\""); hoconConfig.AppendLine($" FFmpegPath = \"{newConfig.FFmpegPath}\"");
@ -2904,7 +2856,6 @@ public class Program
hoconConfig.AppendLine($" DownloadDateSelection = \"{newConfig.DownloadDateSelection.ToString().ToLower()}\""); hoconConfig.AppendLine($" DownloadDateSelection = \"{newConfig.DownloadDateSelection.ToString().ToLower()}\"");
hoconConfig.AppendLine($" CustomDate = \"{newConfig.CustomDate?.ToString("yyyy-MM-dd")}\""); hoconConfig.AppendLine($" CustomDate = \"{newConfig.CustomDate?.ToString("yyyy-MM-dd")}\"");
hoconConfig.AppendLine($" ShowScrapeSize = {newConfig.ShowScrapeSize.ToString().ToLower()}"); hoconConfig.AppendLine($" ShowScrapeSize = {newConfig.ShowScrapeSize.ToString().ToLower()}");
hoconConfig.AppendLine($" DownloadVideoResolution = \"{(newConfig.DownloadVideoResolution == VideoResolution.source ? "source" : newConfig.DownloadVideoResolution.ToString().TrimStart('_'))}\"");
hoconConfig.AppendLine("}"); hoconConfig.AppendLine("}");
hoconConfig.AppendLine("# File Settings"); hoconConfig.AppendLine("# File Settings");
@ -3030,8 +2981,6 @@ public class Program
Log.Debug(configString); Log.Debug(configString);
var hoconConfig = new StringBuilder(); var hoconConfig = new StringBuilder();
hoconConfig.AppendLine("# Auth");
hoconConfig.AppendLine($"DisableBrowserAuth = {newConfig.DisableBrowserAuth.ToString().ToLower()}");
hoconConfig.AppendLine("# External Tools"); hoconConfig.AppendLine("# External Tools");
hoconConfig.AppendLine("External {"); hoconConfig.AppendLine("External {");
hoconConfig.AppendLine($" FFmpegPath = \"{newConfig.FFmpegPath}\""); hoconConfig.AppendLine($" FFmpegPath = \"{newConfig.FFmpegPath}\"");
@ -3063,7 +3012,6 @@ public class Program
hoconConfig.AppendLine($" DownloadDateSelection = \"{newConfig.DownloadDateSelection.ToString().ToLower()}\""); hoconConfig.AppendLine($" DownloadDateSelection = \"{newConfig.DownloadDateSelection.ToString().ToLower()}\"");
hoconConfig.AppendLine($" CustomDate = \"{newConfig.CustomDate?.ToString("yyyy-MM-dd")}\""); hoconConfig.AppendLine($" CustomDate = \"{newConfig.CustomDate?.ToString("yyyy-MM-dd")}\"");
hoconConfig.AppendLine($" ShowScrapeSize = {newConfig.ShowScrapeSize.ToString().ToLower()}"); hoconConfig.AppendLine($" ShowScrapeSize = {newConfig.ShowScrapeSize.ToString().ToLower()}");
hoconConfig.AppendLine($" DownloadVideoResolution = \"{(newConfig.DownloadVideoResolution == VideoResolution.source ? "source" : newConfig.DownloadVideoResolution.ToString().TrimStart('_'))}\"");
hoconConfig.AppendLine("}"); hoconConfig.AppendLine("}");
hoconConfig.AppendLine("# File Settings"); hoconConfig.AppendLine("# File Settings");
@ -3282,12 +3230,4 @@ public class Program
Environment.Exit(2); Environment.Exit(2);
} }
} }
public static VideoResolution ParseVideoResolution(string value)
{
if (value.Equals("source", StringComparison.OrdinalIgnoreCase))
return VideoResolution.source;
return Enum.Parse<VideoResolution>("_" + value, ignoreCase: true);
}
} }

View File

@ -7,7 +7,7 @@ Scrape all the media from an OnlyFans account
Join the discord [here](https://discord.com/invite/6bUW8EJ53j) Join the discord [here](https://discord.com/invite/6bUW8EJ53j)
# Documentation # Documentation
Please refer to https://docs.ofdl.tools/ for instructions on: Please refer to https://sim0n00ps.github.io/OF-DL/ for instructions on:
- Requirements - Requirements
- Installing the Program - Installing the Program
- Running the Program - Running the Program

2
docs/.gitignore vendored
View File

@ -18,5 +18,3 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
venv/

1
docs/.nvmrc Normal file
View File

@ -0,0 +1 @@
20.16.0

41
docs/README.md Normal file
View File

@ -0,0 +1,41 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

3
docs/babel.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View File

@ -1,68 +0,0 @@
# Configuration
The `config.conf` file contains all the options you can change. Click on a configuration option below for more
information about what it does, its default value, and the allowed values.
- Auth
- [DisableBrowserAuth](/config/all-configuration-options#disablebrowserauth)
- External
- [FFmpegPath](/config/all-configuration-options#ffmpegpath)
- Download
- [IgnoreOwnMessages](/config/all-configuration-options#ignoreownmessages)
- [DownloadPostsIncrementally](/config/all-configuration-options#downloadpostsincrementally)
- [BypassContentForCreatorsWhoNoLongerExist](/config/all-configuration-options#bypasscontentforcreatorswhonolongerexist)
- [DownloadDuplicatedMedia](/config/all-configuration-options#downloadduplicatedmedia)
- [SkipAds](/config/all-configuration-options#skipads)
- [DownloadPath](/config/all-configuration-options#downloadpath)
- [DownloadOnlySpecificDates](/config/all-configuration-options#downloadonlyspecificdates)
- [DownloadDateSelection](/config/all-configuration-options#downloaddateselection)
- [CustomDate](/config/all-configuration-options#customdate)
- [ShowScrapeSize](/config/all-configuration-options#showscrapesize)
- Media
- [DownloadAvatarHeaderPhoto](/config/all-configuration-options#downloadavatarheaderphoto)
- [DownloadPaidPosts](/config/all-configuration-options#downloadpaidposts)
- [DownloadPosts](/config/all-configuration-options#downloadposts)
- [DownloadArchived](/config/all-configuration-options#downloadarchived)
- [DownloadStreams](/config/all-configuration-options#downloadstreams)
- [DownloadStories](/config/all-configuration-options#downloadstories)
- [DownloadHighlights](/config/all-configuration-options#downloadhighlights)
- [DownloadMessages](/config/all-configuration-options#downloadmessages)
- [DownloadPaidMessages](/config/all-configuration-options#downloadpaidmessages)
- [DownloadImages](/config/all-configuration-options#downloadimages)
- [DownloadVideos](/config/all-configuration-options#downloadvideos)
- [DownloadAudios](/config/all-configuration-options#downloadaudios)
- File
- [PaidPostFileNameFormat](/config/all-configuration-options#paidpostfilenameformat)
- [PostFileNameFormat](/config/all-configuration-options#postfilenameformat)
- [PaidMessageFileNameFormat](/config/all-configuration-options#paidmessagefilenameformat)
- [MessageFileNameFormat](/config/all-configuration-options#messagefilenameformat)
- [RenameExistingFilesWhenCustomFormatIsSelected](/config/all-configuration-options#renameexistingfileswhencustomformatisselected)
- [CreatorConfigs](/config/all-configuration-options#creatorconfigs)
- Folder
- [FolderPerPaidPost](/config/all-configuration-options#folderperpaidpost)
- [FolderPerPost](/config/all-configuration-options#folderperpost)
- [FolderPerPaidMessage](/config/all-configuration-options#folderperpaidmessage)
- [FolderPerMessage](/config/all-configuration-options#folderpermessage)
- Subscriptions
- [IncludeExpiredSubscriptions](/config/all-configuration-options#includeexpiredsubscriptions)
- [IncludeRestrictedSubscriptions](/config/all-configuration-options#includerestrictedsubscriptions)
- [IgnoredUsersListName](/config/all-configuration-options#ignoreduserslistname)
- Interaction
- [NonInteractiveMode](/config/all-configuration-options#noninteractivemode)
- [NonInteractiveModeListName](/config/all-configuration-options#noninteractivemodelistname)
- [NonInteractiveModePurchasedTab](/config/all-configuration-options#noninteractivemodepurchasedtab)
- Performance
- [Timeout](/config/all-configuration-options#timeout)
- [LimitDownloadRate](/config/all-configuration-options#limitdownloadrate)
- [DownloadLimitInMbPerSec](/config/all-configuration-options#downloadlimitinmbpersec)
- Logging
- [LoggingLevel](/config/all-configuration-options#logginglevel)

View File

@ -0,0 +1,8 @@
{
"label": "Configuration",
"position": 2,
"link": {
"type": "generated-index",
"description": "Configuration options and information for OF-DL"
}
}

View File

@ -1,3 +1,7 @@
---
sidebar_position: 1
---
# Authentication # Authentication
## Current Method (versions >= 1.9.0) ## Current Method (versions >= 1.9.0)
@ -6,14 +10,18 @@ OF DL allows you to log in to your OnlyFans account directly. This simplifies th
When prompted by the application, log into your OnlyFans account. Do not close the opened window, tab, or navigate away to another webpage. When prompted by the application, log into your OnlyFans account. Do not close the opened window, tab, or navigate away to another webpage.
The new window will close automatically when the authentication process has finished. The new window will close automatically when the authentication process has finished.
!!! warning :::warning
Some users have reported that "Sign in with Google" has not been working with this authentication method. Some users have reported that "Sign in with Google" has not been working with this authentication method.
If you use the Google sign-in option to log into your OnlyFans account, use one of the [legacy authentication methods](#legacy-methods) described below. If you use the Google sign-in option to log into your OnlyFans account, use one of the [legacy authentication methods](#legacy-methods) described below.
!!! info :::
If you are using docker, follow the special [authentication instructions documented](/installation/docker) to authenticate OF-DL :::info
If you are using docker, follow the special [authentication instructions documented](/docs/installation/docker) to authenticate OF-DL
:::
## Legacy Methods ## Legacy Methods

View File

@ -1,4 +1,8 @@
# CDM (optional, but recommended) ---
sidebar_position: 4
---
# CDM (optional, but recommended)
Without Widevine/CDM keys, OF DL uses the 3rd party website cdrm-project.org for decrypting DRM videos. With keys, OF DL directly communicates with OnlyFans. It is highly recommended to use keys, both in case the cdrm-project site is having issues (which occur frequently, in our experience) and it will result in faster download speeds, too. However, this is optional, as things will work as long as cdrm-project is functional. Without Widevine/CDM keys, OF DL uses the 3rd party website cdrm-project.org for decrypting DRM videos. With keys, OF DL directly communicates with OnlyFans. It is highly recommended to use keys, both in case the cdrm-project site is having issues (which occur frequently, in our experience) and it will result in faster download speeds, too. However, this is optional, as things will work as long as cdrm-project is functional.
@ -8,13 +12,13 @@ Two files need to be generated, called `device_client_id_blob` and `device_priva
You can find a tutorial on how to do this [here](https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio). You can find a tutorial on how to do this [here](https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio).
I have also made some [batch scripts](https://github.com/sim0n00ps/L3-Dumping) to run the commands included in the guide linked above that can save you some time and makes the process a little simpler. I have also made some [batch scripts](https://github.com/sim0n00ps/L3-Dumping) to run the commands included in the guide linked above that can save you some time and makes the process a little simpler.
## Discord Method ## Discord Method
Generating these keys can be complicated, so the team (shout out to Masaki here) have set up a bot on the Discord server to help securely deliver these keys to users who need them. You can join the discord sever [here](https://discord.com/invite/6bUW8EJ53j) Generating these keys can be complicated, so the team (shout out to Masaki here) have set up a bot on the Discord server to help securely deliver these keys to users who need them. You can join the discord sever [here](https://discord.com/invite/6bUW8EJ53j)
After joining, visit the bot [here](https://discord.com/channels/1198332760947966094/1333835216313122887) (the pinned post in the `#ofdl` support forum) After joining, visit the bot [here](https://discord.com/channels/1198332760947966094/1333835216313122887) (the pinned post in the `#ofdl` support forum)
## After install ## After install

View File

@ -1,6 +1,174 @@
# All Configuration Options ---
sidebar_position: 2
---
This page contains detailed information for each configuration option supported by OF-DL. For information about the structure of the `config.conf` file or a simple list of these configuration options, go to the [configuration page](/config/configuration). # Configuration
The `config.conf` file contains all the options you can change, these options are listed below:
# Configuration - External Tools
## FFmpegPath
Type: `string`
Default: `""`
Allowed values: Any valid path or `""`
Description: This is the path to the FFmpeg executable (`ffmpeg.exe` on Windows and `ffmpeg` on Linux/macOS).
If the path is not set then the program will try to find it in both the same directory as the OF-DL executable as well
as the PATH environment variable.
:::note
If you are using a Windows path, you will need to escape the backslashes, e.g. `"C:\\ffmpeg\\bin\\ffmpeg.exe"`
For example, this is not valid: `"C:\some\path\ffmpeg.exe"`, but `"C:/some/path/ffmpeg.exe"` and `"C:\\some\\path\\ffmpeg.exe"` are both valid.
:::
# Configuration - Download Settings
## DownloadAvatarHeaderPhoto
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Avatar and header images will be downloaded if set to `true`
## DownloadPaidPosts
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Paid posts will be downloaded if set to `true`
## DownloadPosts
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Free posts will be downloaded if set to `true`
## DownloadArchived
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Posts in the "Archived" tab will be downloaded if set to `true`
## DownloadStreams
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Posts in the "Streams" tab will be downloaded if set to `true`
## DownloadStories
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Stories on a user's profile will be downloaded if set to `true`
## DownloadHighlights
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Highlights on a user's will be downloaded if set to `true`
## DownloadMessages
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Free media within messages (including paid message previews) will be downloaded if set to `true`
## DownloadPaidMessages
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Paid media within messages (excluding paid message previews) will be downloaded if set to `true`
## DownloadImages
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Images will be downloaded if set to `true`
## DownloadVideos
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Videos will be downloaded if set to `true`
## DownloadAudios
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Audios will be downloaded if set to `true`
## IgnoreOwnMessages
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: By default (or when set to `false`), messages that were sent by yourself will be added to the metadata DB and any media which has been sent by yourself will be downloaded. If set to `true`, the program will not add messages sent by yourself to the metadata DB and will not download any media which has been sent by yourself.
## DownloadPostsIncrementally
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, only new posts will be downloaded from the date of the last post that was downloaded based off what's in the `user_data.db` file.
If set to `false`, the default behaviour will apply, and all posts will be gathered and compared against the database to see if they need to be downloaded or not.
## BypassContentForCreatorsWhoNoLongerExist ## BypassContentForCreatorsWhoNoLongerExist
@ -14,6 +182,134 @@ Description: When a creator no longer exists (their account has been deleted), m
Purchased content, however, will still be accessible by downloading media usisng the "Download Purchased Tab" menu option Purchased content, however, will still be accessible by downloading media usisng the "Download Purchased Tab" menu option
or with the [NonInteractiveModePurchasedTab](#noninteractivemodepurchasedtab) config option when downloading media in non-interactive mode. or with the [NonInteractiveModePurchasedTab](#noninteractivemodepurchasedtab) config option when downloading media in non-interactive mode.
## DownloadDuplicatedMedia
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: By default (or when set to `false`), the program will not download duplicated media. If set to `true`, duplicated media will be downloaded.
## SkipAds
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: Posts and messages that contain #ad or free trial links will be ignored if set to `true`
## DownloadPath
Type: `string`
Default: `""`
Allowed values: Any valid path
Description: If left blank then content will be downloaded to `__user_data__/sites/OnlyFans/{username}`.
If you set the download path to `"S:/"`, then content will be downloaded to `S:/{username}`
:::note
If you are using a Windows path, you will need to escape the backslashes, e.g. `"C:\\Users\\user\\Downloads\\OnlyFans\\"`
Please make sure your path ends with a `/`
:::
## DownloadOnlySpecificDates
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, posts will be downloaded based on the [DownloadDateSelection](#downloaddateselection) and [CustomDate](#customdate) config options.
If set to `false`, all posts will be downloaded.
## DownloadDateSelection
Type: `string`
Default: `"before"`
Allowed values: `"before"`, `"after"`
Description: [DownloadOnlySpecificDates](#downloadonlyspecificdates) needs to be set to `true` for this to work. This will get all posts from before
the date if set to `"before"`, and all posts from the date you specify up until the current date if set to `"after"`.
The date you specify will be in the [CustomDate](#customdate) config option.
## CustomDate
Type: `string`
Default: `null`
Allowed values: Any date in `yyyy-mm-dd` format or `null`
Description: [DownloadOnlySpecificDates](#downloadonlyspecificdates) needs to be set to `true` for this to work.
This date will be used when you are trying to download between/after a certain date. See [DownloadOnlySpecificDates](#downloadonlyspecificdates) and
[DownloadDateSelection](#downloaddateselection) for more information.
# Configuration - File Settings
## PaidPostFileNameFormat
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to [custom filename formats](/docs/config/custom-filename-formats#paidpostfilenameformat) page to see what fields you can use.
## PostFileNameFormat
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to the [custom filename formats](/docs/config/custom-filename-formats#postfilenameformat) page to see what fields you can use.
## PaidMessageFileNameFormat
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to [custom filename formats](/docs/config/custom-filename-formats#paidmessagefilenameformat) page to see what fields you can use.
## MessageFileNameFormat
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to [custom filename formats](/docs/config/custom-filename-formats#messagefilenameformat) page to see what fields you can use.
## RenameExistingFilesWhenCustomFormatIsSelected
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: When `true`, any current files downloaded will have the current format applied to them.
When `false`, only new files will have the current format applied to them.
# Configuration - Creator-Specific Configurations
## CreatorConfigs ## CreatorConfigs
Type: `object` Type: `object`
@ -26,7 +322,7 @@ Description: This configuration options allows you to set file name formats for
This is useful if you want to have different file name formats for different creators. The values set here will override the global values set in the config file This is useful if you want to have different file name formats for different creators. The values set here will override the global values set in the config file
(see [PaidPostFileNameFormat](#paidpostfilenameformat), [PostFileNameFormat](#postfilenameformat), (see [PaidPostFileNameFormat](#paidpostfilenameformat), [PostFileNameFormat](#postfilenameformat),
[PaidMessageFileNAmeFormat](#paidmessagefilenameformat), and [MessageFileNameFormat](#messagefilenameformat)). [PaidMessageFileNAmeFormat](#paidmessagefilenameformat), and [MessageFileNameFormat](#messagefilenameformat)).
For more information on the file name formats, see the [custom filename formats](/config/custom-filename-formats) page. For more information on the file name formats, see the [custom filename formats](/docs/config/custom-filename-formats) page.
Example: Example:
``` ```
@ -46,259 +342,7 @@ Example:
} }
``` ```
## CustomDate # Configuration - Folder Settings
Type: `string`
Default: `null`
Allowed values: Any date in `yyyy-mm-dd` format or `null`
Description: [DownloadOnlySpecificDates](#downloadonlyspecificdates) needs to be set to `true` for this to work.
This date will be used when you are trying to download between/after a certain date. See [DownloadOnlySpecificDates](#downloadonlyspecificdates) and
[DownloadDateSelection](#downloaddateselection) for more information.
## DisableBrowserAuth
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: The built-in/bundled web browser will not be used to authenticate OF-DL if set to `true`. If set to `true`,
an `auth.json` file will need to be provided using a [legacy authentication method](/config/auth#legacy-methods).
If set to `true`, the `auth.json` file will not be deleted if authentication fails. If set to `false` (the default
behavior), OF-DL will delete the `auth.json` file if authentication fails.
## DownloadArchived
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Posts in the "Archived" tab will be downloaded if set to `true`
## DownloadAudios
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Audios will be downloaded if set to `true`
## DownloadAvatarHeaderPhoto
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Avatar and header images will be downloaded if set to `true`
## DownloadDateSelection
Type: `string`
Default: `"before"`
Allowed values: `"before"`, `"after"`
Description: [DownloadOnlySpecificDates](#downloadonlyspecificdates) needs to be set to `true` for this to work. This will get all posts from before
the date if set to `"before"`, and all posts from the date you specify up until the current date if set to `"after"`.
The date you specify will be in the [CustomDate](#customdate) config option.
## DownloadDuplicatedMedia
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: By default (or when set to `false`), the program will not download duplicated media. If set to `true`, duplicated media will be downloaded.
## DownloadHighlights
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Highlights on a user's will be downloaded if set to `true`
## DownloadImages
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Images will be downloaded if set to `true`
## DownloadLimitInMbPerSec
Type: `integer`
Default: `4`
Allowed values: Any positive integer
Description: The download rate in MB per second. This will only be used if [LimitDownloadRate](#limitdownloadrate) is set to `true`.
## DownloadMessages
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Free media within messages (including paid message previews) will be downloaded if set to `true`
## DownloadOnlySpecificDates
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, posts will be downloaded based on the [DownloadDateSelection](#downloaddateselection) and [CustomDate](#customdate) config options.
If set to `false`, all posts will be downloaded.
## DownloadPaidMessages
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Paid media within messages (excluding paid message previews) will be downloaded if set to `true`
## DownloadPaidPosts
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Paid posts will be downloaded if set to `true`
## DownloadPath
Type: `string`
Default: `""`
Allowed values: Any valid path
Description: If left blank then content will be downloaded to `__user_data__/sites/OnlyFans/{username}`.
If you set the download path to `"S:/"`, then content will be downloaded to `S:/{username}`
!!! note
If you are using a Windows path, you will need to escape the backslashes, e.g. `"C:\\Users\\user\\Downloads\\OnlyFans\\"`
Please make sure your path ends with a `/`
## DownloadPosts
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Free posts will be downloaded if set to `true`
## DownloadPostsIncrementally
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, only new posts will be downloaded from the date of the last post that was downloaded based off what's in the `user_data.db` file.
If set to `false`, the default behaviour will apply, and all posts will be gathered and compared against the database to see if they need to be downloaded or not.
## DownloadStories
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Stories on a user's profile will be downloaded if set to `true`
## DownloadStreams
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Posts in the "Streams" tab will be downloaded if set to `true`
## DownloadVideos
Type: `boolean`
Default: `true`
Allowed values: `true`, `false`
Description: Videos will be downloaded if set to `true`
## FFmpegPath
Type: `string`
Default: `""`
Allowed values: Any valid path or `""`
Description: This is the path to the FFmpeg executable (`ffmpeg.exe` on Windows and `ffmpeg` on Linux/macOS).
If the path is not set then the program will try to find it in both the same directory as the OF-DL executable as well
as the PATH environment variable.
!!! note
If you are using a Windows path, you will need to escape the backslashes, e.g. `"C:\\ffmpeg\\bin\\ffmpeg.exe"`
For example, this is not valid: `"C:\some\path\ffmpeg.exe"`, but `"C:/some/path/ffmpeg.exe"` and `"C:\\some\\path\\ffmpeg.exe"` are both valid.
## FolderPerMessage
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: A folder will be created for each message (containing all the media for that message) if set to `true`.
When set to `false`, message media will be downloaded into the `Messages/Free` folder.
## FolderPerPaidMessage
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: A folder will be created for each paid message (containing all the media for that message) if set to `true`.
When set to `false`, paid message media will be downloaded into the `Messages/Paid` folder.
## FolderPerPaidPost ## FolderPerPaidPost
@ -322,7 +366,7 @@ Allowed values: `true`, `false`
Description: A folder will be created for each post (containing all the media for that post) if set to `true`. Description: A folder will be created for each post (containing all the media for that post) if set to `true`.
When set to `false`, post media will be downloaded into the `Posts/Free` folder. When set to `false`, post media will be downloaded into the `Posts/Free` folder.
## IgnoreOwnMessages ## FolderPerPaidMessage
Type: `boolean` Type: `boolean`
@ -330,18 +374,21 @@ Default: `false`
Allowed values: `true`, `false` Allowed values: `true`, `false`
Description: By default (or when set to `false`), messages that were sent by yourself will be added to the metadata DB and any media which has been sent by yourself will be downloaded. If set to `true`, the program will not add messages sent by yourself to the metadata DB and will not download any media which has been sent by yourself. Description: A folder will be created for each paid message (containing all the media for that message) if set to `true`.
When set to `false`, paid message media will be downloaded into the `Messages/Paid` folder.
## IgnoredUsersListName ## FolderPerMessage
Type: `string` Type: `boolean`
Default: `""` Default: `false`
Allowed values: The name of a list of users you have created on OnlyFans or `""` Allowed values: `true`, `false`
Description: When set to the name of a list, users in the list will be ignored when scraping content. Description: A folder will be created for each message (containing all the media for that message) if set to `true`.
If set to `""` (or an invalid list name), no users will be ignored when scraping content. When set to `false`, message media will be downloaded into the `Messages/Free` folder.
# Configuration - Subscription Settings
## IncludeExpiredSubscriptions ## IncludeExpiredSubscriptions
@ -363,36 +410,18 @@ Allowed values: `true`, `false`
Description: If set to `true`, media from restricted creators will be downloaded. If set to `false`, restricted creators will be ignored. Description: If set to `true`, media from restricted creators will be downloaded. If set to `false`, restricted creators will be ignored.
## LimitDownloadRate ## IgnoredUsersListName
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, the download rate will be limited to the value set in [DownloadLimitInMbPerSec](#downloadlimitinmbpersec).
## LoggingLevel
Type: `string`
Default: `"Error"`
Allowed values: `"Verbose"`, `"Debug"`, `"Information"`, `"Warning"`, `"Error"`, `"Fatal"`
Description: The level of logging that will be saved to the log files in the `logs` folder.
When requesting help with an issue, it is recommended to set this to `"Verbose"` and provide the log file.
## MessageFileNameFormat
Type: `string` Type: `string`
Default: `""` Default: `""`
Allowed values: Any valid string Allowed values: The name of a list of users you have created on OnlyFans or `""`
Description: Please refer to [custom filename formats](/config/custom-filename-formats#messagefilenameformat) page to see what fields you can use. Description: When set to the name of a list, users in the list will be ignored when scraping content.
If set to `""` (or an invalid list name), no users will be ignored when scraping content.
# Configuration - Interaction Settings
## NonInteractiveMode ## NonInteractiveMode
@ -406,14 +435,15 @@ Description: If set to `true`, the program will run without any input from the u
(unless [NonInteractiveModeListName](#noninteractivemodelistname) or [NonInteractiveModePurchasedTab](#noninteractivemodepurchasedtab) are configured). (unless [NonInteractiveModeListName](#noninteractivemodelistname) or [NonInteractiveModePurchasedTab](#noninteractivemodepurchasedtab) are configured).
If set to `false`, the default behaviour will apply, and you will be able to choose an option from the menu. If set to `false`, the default behaviour will apply, and you will be able to choose an option from the menu.
!!! warning :::warning
If NonInteractiveMode is enabled, you will be unable to authenticate OF-DL using the standard authentication method. If NonInteractiveMode is enabled, you will be unable to authenticate OF-DL using the standard authentication method.
Before you can run OF-DL in NonInteractiveMode, you must either Before you can run OF-DL in NonInteractiveMode, you must either
1. Generate an auth.json file by running OF-DL with NonInteractiveMode disabled and authenticating OF-DL using the standard method **OR** 1. Generate an auth.json file by running OF-DL with NonInteractiveMode disabled and authenticating OF-DL using the standard method **OR**
2. Generate an auth.json file by using a [legacy authentication method](/config/auth#legacy-methods) 2. Generate an auth.json file by using a [legacy authentication method](/docs/config/auth#legacy-methods)
:::
## NonInteractiveModeListName ## NonInteractiveModeListName
@ -439,72 +469,7 @@ Description: When set to `true`, non-interactive mode will only download content
(when [NonInteractiveMode](#noninteractivemode) is set to `true`). If set to `false`, all users will be scraped (when [NonInteractiveMode](#noninteractivemode) is set to `true`). If set to `false`, all users will be scraped
(unless [NonInteractiveModeListName](#noninteractivemodelistname) is configured). (unless [NonInteractiveModeListName](#noninteractivemodelistname) is configured).
## PaidMessageFileNameFormat # Configuration - Performance Settings
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to [custom filename formats](/config/custom-filename-formats#paidmessagefilenameformat) page to see what fields you can use.
## PaidPostFileNameFormat
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to [custom filename formats](/config/custom-filename-formats#paidpostfilenameformat) page to see what fields you can use.
## PostFileNameFormat
Type: `string`
Default: `""`
Allowed values: Any valid string
Description: Please refer to the [custom filename formats](/config/custom-filename-formats#postfilenameformat) page to see what fields you can use.
## RenameExistingFilesWhenCustomFormatIsSelected
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: When `true`, any current files downloaded will have the current format applied to them.
When `false`, only new files will have the current format applied to them.
## ShowScrapeSize
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, the total scrape size will be shown in bytes when downloading posts, messages, etc.
When set to `false`, the total number of posts, messages, etc. will be shown.
!!! warning
Setting this to `true` will have an impact on performance as it has to go through each piece of media and get the size
from the server, which is a big task and can sometimes get you rate limited.
## SkipAds
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: Posts and messages that contain #ad or free trial links will be ignored if set to `true`
## Timeout ## Timeout
@ -516,3 +481,36 @@ Allowed values: Any positive integer or `-1`
Description: You won't need to set this, but if you see errors about the configured timeout of 100 seconds elapsing then Description: You won't need to set this, but if you see errors about the configured timeout of 100 seconds elapsing then
you could set this to be more than 100. It is recommended that you leave this as the default value. you could set this to be more than 100. It is recommended that you leave this as the default value.
## LimitDownloadRate
Type: `boolean`
Default: `false`
Allowed values: `true`, `false`
Description: If set to `true`, the download rate will be limited to the value set in [DownloadLimitInMbPerSec](#downloadlimitinmbpersec).
## DownloadLimitInMbPerSec
Type: `integer`
Default: `4`
Allowed values: Any positive integer
Description: The download rate in MB per second. This will only be used if [LimitDownloadRate](#limitdownloadrate) is set to `true`.
# Configuration - Logging/Debug Settings
## LoggingLevel
Type: `string`
Default: `"Error"`
Allowed values: `"Verbose"`, `"Debug"`, `"Information"`, `"Warning"`, `"Error"`, `"Fatal"`
Description: The level of logging that will be saved to the log files in the `logs` folder.
When requesting help with an issue, it is recommended to set this to `"Verbose"` and provide the log file.

View File

@ -1,3 +1,7 @@
---
sidebar_position: 3
---
# Custom Filename Formats # Custom Filename Formats
In the config.conf file you can now specify some custom filename formats that will be used when downloading files. I have had to add 4 new fields to the auth.json file, these are: In the config.conf file you can now specify some custom filename formats that will be used when downloading files. I have had to add 4 new fields to the auth.json file, these are:

View File

@ -0,0 +1,8 @@
{
"label": "Installation",
"position": 1,
"link": {
"type": "generated-index",
"description": "Installation instructions for OF-DL"
}
}

View File

@ -1,4 +1,8 @@
# Docker ---
sidebar_position: 2
---
# Docker
## Running OF-DL ## Running OF-DL
@ -14,7 +18,7 @@ To run OF-DL in a docker container, follow these steps:
Adjust `$HOME/ofdl` as desired (including in the commands below) if you want the files stored elsewhere. Adjust `$HOME/ofdl` as desired (including in the commands below) if you want the files stored elsewhere.
4. Run the following command to start the docker container: 4. Run the following command to start the docker container:
```bash ```bash
docker run --rm -it -v $HOME/ofdl/data/:/data -v $HOME/ofdl/config/:/config -p 8080:8080 git.ofdl.tools/sim0n00ps/of-dl:latest docker run --rm -it -v $HOME/ofdl/data/:/data -v $HOME/ofdl/config/:/config -p 8080:8080 ghcr.io/sim0n00ps/of-dl:latest
``` ```
If `config.json` and/or `rules.json` don't exist in the `config` directory, files with default values will be created when you run the docker container. If `config.json` and/or `rules.json` don't exist in the `config` directory, files with default values will be created when you run the docker container.
If you have your own Widevine keys, those files should be placed under `$HOME/ofdl/config/cdm/devices/chrome_1610/`. If you have your own Widevine keys, those files should be placed under `$HOME/ofdl/config/cdm/devices/chrome_1610/`.
@ -25,14 +29,14 @@ To run OF-DL in a docker container, follow these steps:
When a new version of OF-DL is released, you can download the latest docker image by executing: When a new version of OF-DL is released, you can download the latest docker image by executing:
```bash ```bash
docker pull git.ofdl.tools/sim0n00ps/of-dl:latest docker pull ghcr.io/sim0n00ps/of-dl:latest
``` ```
You can then run the new version of OF-DL by executing the `docker run` command in the [Running OF-DL](#running-of-dl) section above. You can then run the new version of OF-DL by executing the `docker run` command in the [Running OF-DL](#running-of-dl) section above.
## Building the Docker Image (Optional) ## Building the Docker Image (Optional)
Since official docker images are provided for OF-DL through Gitea (git.ofdl.tools), you do not need to build the docker image yourself. Since official docker images are provided for OF-DL through GitHub Container Registry (ghcr.io), you do not need to build the docker image yourself.
If you would like to build the docker image yourself, however, start by cloning the OF-DL repository and opening a terminal in the root directory of the repository. If you would like to build the docker image yourself, however, start by cloning the OF-DL repository and opening a terminal in the root directory of the repository.
Then, execute the following command while replacing `x.x.x` with the current version of OF-DL: Then, execute the following command while replacing `x.x.x` with the current version of OF-DL:
@ -41,4 +45,4 @@ VERSION="x.x.x" docker build --build-arg VERSION=$VERSION -t of-dl .
``` ```
You can then run a container using the image you just built by executing the `docker run` command in the You can then run a container using the image you just built by executing the `docker run` command in the
[Running OF-DL](#running-of-dl) section above while replacing `git.ofdl.tools/sim0n00ps/of-dl:latest` with `of-dl`. [Running OF-DL](#running-of-dl) section above while replacing `ghcr.io/sim0n00ps/of-dl:latest` with `of-dl`.

View File

@ -1,7 +1,11 @@
# Linux ---
sidebar_position: 3
---
# Linux
A Linux release of OF-DL is not available at this time, however you can run OF-DL on Linux using Docker. A Linux release of OF-DL is not available at this time, however you can run OF-DL on Linux using Docker.
Please refer to the [Docker](/installation/docker) page for instructions on how to run OF-DL in a Docker container. Please refer to the [Docker](/docs/installation/docker) page for instructions on how to run OF-DL in a Docker container.
If you do not have Docker installed, you can download it from [here](https://docs.docker.com/desktop/install/linux-install/). If you do not have Docker installed, you can download it from [here](https://docs.docker.com/desktop/install/linux-install/).
If you would like to run OF-DL natively on Linux, you can build it from source by following the instructions below. If you would like to run OF-DL natively on Linux, you can build it from source by following the instructions below.
@ -23,7 +27,7 @@ sudo apt-get install libicu-dev
- Clone the repo - Clone the repo
```bash ```bash
git clone https://git.ofdl.tools/sim0n00ps/OF-DL.git git clone https://github.com/sim0n00ps/OF-DL.git
cd 'OF-DL' cd 'OF-DL'
``` ```
@ -34,7 +38,7 @@ dotnet publish -p:Version=%VERSION% -c Release
cd 'OF DL/bin/Release/net8.0' cd 'OF DL/bin/Release/net8.0'
``` ```
- Download the windows release as described on [here](/installation/windows#installation). - Download the windows release as described on [here](/docs/installation/windows#installation).
- Add the `config.json` and `rules.json` files as well as the `cdm` folder to the `OF DL/bin/Release/net8.0` folder. - Add the `config.json` and `rules.json` files as well as the `cdm` folder to the `OF DL/bin/Release/net8.0` folder.
- Run the application - Run the application

View File

@ -1,5 +1,9 @@
# macOS ---
sidebar_position: 4
---
# macOS
macOS releases of OF-DL are not available at this time, however you can run OF-DL on macOS using Docker. macOS releases of OF-DL are not available at this time, however you can run OF-DL on macOS using Docker.
Please refer to the [Docker](/installation/docker) page for instructions on how to run OF-DL in a Docker container. Please refer to the [Docker](/docs/installation/docker) page for instructions on how to run OF-DL in a Docker container.
If you do not have Docker installed, you can download it from [here](https://docs.docker.com/desktop/install/mac-install/). If you do not have Docker installed, you can download it from [here](https://docs.docker.com/desktop/install/mac-install/).

View File

@ -1,4 +1,8 @@
# Windows ---
sidebar_position: 1
---
# Windows
## Requirements ## Requirements
@ -7,11 +11,11 @@
You will need to download FFmpeg. You can download it from [here](https://www.gyan.dev/ffmpeg/builds/). You will need to download FFmpeg. You can download it from [here](https://www.gyan.dev/ffmpeg/builds/).
Make sure you download `ffmpeg-release-essentials.zip`. Unzip it anywhere on your computer. You only need `ffmpeg.exe`, and you can ignore the rest. Make sure you download `ffmpeg-release-essentials.zip`. Unzip it anywhere on your computer. You only need `ffmpeg.exe`, and you can ignore the rest.
Move `ffmpeg.exe` to the same folder as `OF DL.exe` (downloaded in the installation steps below). If you choose to move `ffmpeg.exe` to a different folder, Move `ffmpeg.exe` to the same folder as `OF DL.exe` (downloaded in the installation steps below). If you choose to move `ffmpeg.exe` to a different folder,
you will need to specify the path to `ffmpeg.exe` in the config file (see the `FFmpegPath` [config option](/config/configuration#ffmpegpath)). you will need to specify the path to `ffmpeg.exe` in the config file (see the `FFmpegPath` [config option](/docs/config/configuration#ffmpegpath)).
## Installation ## Installation
1. Navigate to the OF-DL [releases page](https://git.ofdl.tools/sim0n00ps/OF-DL/releases), and download the latest release zip file. The zip file will be named `OFDLVx.x.x.zip` where `x.x.x` is the version number. 1. Navigate to the OF-DL [releases page](https://github.com/sim0n00ps/OF-DL/releases), and download the latest release zip file. The zip file will be named `OFDLVx.x.x.zip` where `x.x.x` is the version number.
2. Unzip the downloaded file. The destination folder can be anywhere on your computer, preferably somewhere where you want to download content to/already have content downloaded. 2. Unzip the downloaded file. The destination folder can be anywhere on your computer, preferably somewhere where you want to download content to/already have content downloaded.
3. Your folder should contain a folder named `cdm` as well as the following files: 3. Your folder should contain a folder named `cdm` as well as the following files:
- OF DL.exe - OF DL.exe

View File

@ -1,6 +1,10 @@
# Running the Program ---
sidebar_position: 3
---
Once you are happy you have filled everything in [auth.json](/config/auth) correctly, you can double click OF-DL.exe and you should see a command prompt window appear, it should look something like this: # Running the Program
Once you are happy you have filled everything in [auth.json](/docs/config/auth) correctly, you can double click OF-DL.exe and you should see a command prompt window appear, it should look something like this:
![CLI welcome banner](/img/welcome_banner.png) ![CLI welcome banner](/img/welcome_banner.png)

123
docs/docusaurus.config.js Normal file
View File

@ -0,0 +1,123 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'OF-DL',
tagline: 'A media scraper for OnlyFans with DRM video support',
favicon: 'img/logo.png',
// Set the production url of your site here
url: 'https://sim0n00ps.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/OF-DL/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'sim0n00ps', // Usually your GitHub org/user name.
projectName: 'OF-DL', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
},
blog: false,
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
title: 'OF-DL',
logo: {
alt: 'OF-DL Logo',
src: 'img/logo.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'generatedSidebar',
position: 'left',
label: 'Docs',
},
{
href: 'https://github.com/sim0n00ps/OF-DL',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Installation',
to: '/docs/installation/windows',
},
{
label: 'Configuration',
to: '/docs/config/auth',
},
{
label: 'Running the Program',
to: '/docs/running-the-program',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.com/invite/6bUW8EJ53j',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/sim0n00ps/OF-DL',
},
],
},
],
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};
export default config;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

View File

@ -1,8 +0,0 @@
# Welcome to OF-DL
C# console app to download all of the media from Onlyfans accounts with DRM video downloading support.
!!! info "PLEASE READ BEFORE DOWNLOADING"
THIS TOOL CANNOT BYPASS PAYWALLS, IT CAN ONLY DOWNLOAD CONTENT YOU HAVE ACCESS TO, PLEASE DO NOT DOWNLOAD THIS TOOL THINKING YOU CAN BYPASS PAYING FOR THINGS!!!!!
Join the discord [here](https://discord.com/invite/6bUW8EJ53j)

15550
docs/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

44
docs/package.json Normal file
View File

@ -0,0 +1,44 @@
{
"name": "of-dl",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.4.0",
"@docusaurus/preset-classic": "3.4.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.4.0",
"@docusaurus/types": "3.4.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}

33
docs/sidebars.js Normal file
View File

@ -0,0 +1,33 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
generatedSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};
export default sidebars;

39
docs/src/pages/index.js Normal file
View File

@ -0,0 +1,39 @@
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import Heading from '@theme/Heading';
import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="docs/installation/windows">
Installation
</Link>
</div>
</div>
</header>
);
}
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={siteConfig.title}
description={siteConfig.tagline}>
<HomepageHeader />
</Layout>
);
}

View File

@ -0,0 +1,23 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}
@media screen and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}

0
docs/static/.nojekyll vendored Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
docs/static/img/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,60 +0,0 @@
site_name: OF-DL Docs
site_url: https://docs.ofdl.tools
nav:
- Home: index.md
- Running the Program: running-the-program.md
- Config:
- Authentication: config/auth.md
- CDM (optional, but recommended): config/cdm.md
- Configuration: config/configuration.md
- All Configuration Options: config/all-configuration-options.md
- Custom Filename Formats: config/custom-filename-formats.md
- Installation:
- Windows: installation/windows.md
- macOS: installation/macos.md
- Linux: installation/linux.md
- Docker: installation/docker.md
theme:
name: material
features:
- navigation.tabs
- navigation.top
- navigation.instant
- navigation.expand
- navigation.sections
- navigation.tracking
- navigation.search.highlight
- navigation.search.suggest
- navigation.search.share
- navigation.search.suggest
- navigation.search.share
- navigation.search.suggest
- navigation.search.share
language: en
palette:
- scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
primary: dark-blue
accent: white
- scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode
primary: dark-blue
accent: white
font:
text: Roboto
code: Roboto Mono
logo: img/logo.ico
favicon: img/logo.ico
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
extra:
social:
- icon: fontawesome/brands/discord
link: https://discord.com/invite/6bUW8EJ53j
copyright: "© 2025 OF-DL. All rights reserved."