[fansly] disable 'formats' check by default (#8757)

should allow downloading and selecting the highest resolution video format
regardless of its 'type' / format code
This commit is contained in:
Mike Fährmann
2025-12-25 19:15:21 +01:00
parent 6845661123
commit 01fe6870a3
3 changed files with 7 additions and 3 deletions

View File

@@ -3130,6 +3130,8 @@ extractor.fansly.formats
Type
``list`` of ``integers``
Default
``null``
Example
``[1, 2, 3, 4, 302, 303]``
Description
List of file formats to consider during format selection.

View File

@@ -354,7 +354,7 @@
{
"token": "",
"formats": [1, 2, 3, 4, 302, 303]
"formats": null
},
"flickr":
{

View File

@@ -29,7 +29,7 @@ class FanslyExtractor(Extractor):
if fmts := self.config("formats"):
self.formats = set(fmts)
else:
self.formats = {1, 2, 3, 4, 302, 303}
self.formats = None
def items(self):
for post in self.posts():
@@ -95,11 +95,13 @@ class FanslyExtractor(Extractor):
if media.get("locations"):
variants.append(media)
fmts = self.formats
formats = [
(variant["width"], (type-500 if type > 256 else type), variant)
for variant in variants
if variant.get("locations") and
(type := variant["type"]) in self.formats
(type := variant["type"]) and
(fmts is None or type in fmts)
]
try: