[furaffinity] add 'layout' option (#2277)
to be able to force gallery-dl to parse according to a specific layout in case its auto-detect fails
This commit is contained in:
parent
4e4cb40663
commit
f1c853c6ef
@ -1257,6 +1257,20 @@ Description
|
|||||||
You can use ``"all"`` instead of listing all values separately.
|
You can use ``"all"`` instead of listing all values separately.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.furaffinity.layout
|
||||||
|
----------------------------
|
||||||
|
Type
|
||||||
|
``string``
|
||||||
|
Default
|
||||||
|
``"auto"``
|
||||||
|
Description
|
||||||
|
Selects which site layout to expect when parsing posts.
|
||||||
|
|
||||||
|
* ``"auto"``: Automatically differentiate between ``"old"`` and ``"new"``
|
||||||
|
* ``"old"``: Expect the *old* site layout
|
||||||
|
* ``"new"``: Expect the *new* site layout
|
||||||
|
|
||||||
|
|
||||||
extractor.generic.enabled
|
extractor.generic.enabled
|
||||||
-------------------------
|
-------------------------
|
||||||
Type
|
Type
|
||||||
|
@ -102,7 +102,8 @@
|
|||||||
{
|
{
|
||||||
"descriptions": "text",
|
"descriptions": "text",
|
||||||
"external": false,
|
"external": false,
|
||||||
"include": "gallery"
|
"include": "gallery",
|
||||||
|
"layout": "auto"
|
||||||
},
|
},
|
||||||
"gfycat":
|
"gfycat":
|
||||||
{
|
{
|
||||||
|
@ -28,11 +28,16 @@ class FuraffinityExtractor(Extractor):
|
|||||||
Extractor.__init__(self, match)
|
Extractor.__init__(self, match)
|
||||||
self.user = match.group(1)
|
self.user = match.group(1)
|
||||||
self.offset = 0
|
self.offset = 0
|
||||||
self._new_layout = None
|
|
||||||
|
|
||||||
if self.config("descriptions") == "html":
|
if self.config("descriptions") == "html":
|
||||||
self._process_description = str.strip
|
self._process_description = str.strip
|
||||||
|
|
||||||
|
layout = self.config("layout")
|
||||||
|
if layout and layout != "auto":
|
||||||
|
self._new_layout = False if layout == "old" else True
|
||||||
|
else:
|
||||||
|
self._new_layout = None
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
|
|
||||||
if self._warning:
|
if self._warning:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user