[misskey] add 'text-posts' option (#8516)
do not request text-only notes by default
This commit is contained in:
@@ -4187,6 +4187,16 @@ Description
|
|||||||
Fetch media from replies to other notes.
|
Fetch media from replies to other notes.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.[misskey].text-posts
|
||||||
|
------------------------------
|
||||||
|
Type
|
||||||
|
``bool``
|
||||||
|
Default
|
||||||
|
``false``
|
||||||
|
Description
|
||||||
|
Also retrieve text-only notes without media content.
|
||||||
|
|
||||||
|
|
||||||
extractor.[moebooru].pool.metadata
|
extractor.[moebooru].pool.metadata
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Type
|
Type
|
||||||
|
|||||||
@@ -1081,7 +1081,8 @@
|
|||||||
"access-token": null,
|
"access-token": null,
|
||||||
"include" : ["notes"],
|
"include" : ["notes"],
|
||||||
"renotes" : false,
|
"renotes" : false,
|
||||||
"replies" : true
|
"replies" : true,
|
||||||
|
"text-posts" : false
|
||||||
},
|
},
|
||||||
|
|
||||||
"Nijie":
|
"Nijie":
|
||||||
|
|||||||
@@ -248,8 +248,10 @@ class MisskeyAPI():
|
|||||||
return self.extractor.request_json(url, method="POST", json=data)
|
return self.extractor.request_json(url, method="POST", json=data)
|
||||||
|
|
||||||
def _pagination(self, endpoint, data):
|
def _pagination(self, endpoint, data):
|
||||||
|
extr = self.extractor
|
||||||
data["limit"] = 100
|
data["limit"] = 100
|
||||||
data["withRenotes"] = self.extractor.renotes
|
data["withRenotes"] = extr.renotes
|
||||||
|
data["withFiles"] = False if extr.config("text-posts") else True
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
notes = self._call(endpoint, data)
|
notes = self._call(endpoint, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user