[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:
@@ -3130,6 +3130,8 @@ extractor.fansly.formats
|
|||||||
Type
|
Type
|
||||||
``list`` of ``integers``
|
``list`` of ``integers``
|
||||||
Default
|
Default
|
||||||
|
``null``
|
||||||
|
Example
|
||||||
``[1, 2, 3, 4, 302, 303]``
|
``[1, 2, 3, 4, 302, 303]``
|
||||||
Description
|
Description
|
||||||
List of file formats to consider during format selection.
|
List of file formats to consider during format selection.
|
||||||
|
|||||||
@@ -354,7 +354,7 @@
|
|||||||
{
|
{
|
||||||
"token": "",
|
"token": "",
|
||||||
|
|
||||||
"formats": [1, 2, 3, 4, 302, 303]
|
"formats": null
|
||||||
},
|
},
|
||||||
"flickr":
|
"flickr":
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class FanslyExtractor(Extractor):
|
|||||||
if fmts := self.config("formats"):
|
if fmts := self.config("formats"):
|
||||||
self.formats = set(fmts)
|
self.formats = set(fmts)
|
||||||
else:
|
else:
|
||||||
self.formats = {1, 2, 3, 4, 302, 303}
|
self.formats = None
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
for post in self.posts():
|
for post in self.posts():
|
||||||
@@ -95,11 +95,13 @@ class FanslyExtractor(Extractor):
|
|||||||
if media.get("locations"):
|
if media.get("locations"):
|
||||||
variants.append(media)
|
variants.append(media)
|
||||||
|
|
||||||
|
fmts = self.formats
|
||||||
formats = [
|
formats = [
|
||||||
(variant["width"], (type-500 if type > 256 else type), variant)
|
(variant["width"], (type-500 if type > 256 else type), variant)
|
||||||
for variant in variants
|
for variant in variants
|
||||||
if variant.get("locations") and
|
if variant.get("locations") and
|
||||||
(type := variant["type"]) in self.formats
|
(type := variant["type"]) and
|
||||||
|
(fmts is None or type in fmts)
|
||||||
]
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user