mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[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.
|
||||
|
||||
|
||||
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
|
||||
-------------------------
|
||||
Type
|
||||
|
@ -102,7 +102,8 @@
|
||||
{
|
||||
"descriptions": "text",
|
||||
"external": false,
|
||||
"include": "gallery"
|
||||
"include": "gallery",
|
||||
"layout": "auto"
|
||||
},
|
||||
"gfycat":
|
||||
{
|
||||
|
@ -28,11 +28,16 @@ class FuraffinityExtractor(Extractor):
|
||||
Extractor.__init__(self, match)
|
||||
self.user = match.group(1)
|
||||
self.offset = 0
|
||||
self._new_layout = None
|
||||
|
||||
if self.config("descriptions") == "html":
|
||||
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):
|
||||
|
||||
if self._warning:
|
||||
|
Loading…
Reference in New Issue
Block a user