[kemonoparty] 'postfile' -> 'file' (#1991)
to stay consistent with the existing file types for kemono
This commit is contained in:
@@ -1343,11 +1343,11 @@ extractor.kemonoparty.files
|
|||||||
Type
|
Type
|
||||||
``list`` of ``strings``
|
``list`` of ``strings``
|
||||||
Default
|
Default
|
||||||
``["postfile", "attachments", "inline"]``
|
``["file", "attachments", "inline"]``
|
||||||
Description
|
Description
|
||||||
Determines the type and order of files to be downloaded.
|
Determines the type and order of files to be downloaded.
|
||||||
|
|
||||||
Available types are ``postfile``, ``attachments``, and ``inline``.
|
Available types are ``file``, ``attachments``, and ``inline``.
|
||||||
|
|
||||||
|
|
||||||
extractor.kemonoparty.max-posts
|
extractor.kemonoparty.max-posts
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class KemonopartyExtractor(Extractor):
|
|||||||
|
|
||||||
return {c.name: c.value for c in response.history[0].cookies}
|
return {c.name: c.value for c in response.history[0].cookies}
|
||||||
|
|
||||||
def _postfile(self, post):
|
def _file(self, post):
|
||||||
file = post["file"]
|
file = post["file"]
|
||||||
if not file:
|
if not file:
|
||||||
return ()
|
return ()
|
||||||
@@ -124,9 +124,9 @@ class KemonopartyExtractor(Extractor):
|
|||||||
|
|
||||||
def _build_file_generators(self, filetypes):
|
def _build_file_generators(self, filetypes):
|
||||||
if filetypes is None:
|
if filetypes is None:
|
||||||
return (self._postfile, self._attachments, self._inline)
|
return (self._file, self._attachments, self._inline)
|
||||||
genmap = {
|
genmap = {
|
||||||
"postfile" : self._postfile,
|
"file" : self._file,
|
||||||
"attachments": self._attachments,
|
"attachments": self._attachments,
|
||||||
"inline" : self._inline,
|
"inline" : self._inline,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user