1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-24 19:52:32 +01:00

[civitai] use tRPC API by default (#6279)

This commit is contained in:
Mike Fährmann 2024-10-06 08:57:58 +02:00
parent a9671f160b
commit b12d65ade2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 6 additions and 6 deletions

View File

@ -1590,12 +1590,12 @@ extractor.civitai.api
Type
``string``
Default
``"rest"``
``"trpc"``
Description
Selects which API endpoints to use.
* ``"rest"``: `Public REST API <https://developer.civitai.com/docs/api/public-rest>`__
* ``"trpc"``: Internal TRPC API
* ``"trpc"``: Internal tRPC API
extractor.civitai.api-key

View File

@ -27,12 +27,12 @@ class CivitaiExtractor(Extractor):
request_interval = (0.5, 1.5)
def _init(self):
if self.config("api") == "trpc":
self.log.debug("Using tRPC API")
self.api = CivitaiTrpcAPI(self)
else:
if self.config("api") == "rest":
self.log.debug("Using REST API")
self.api = CivitaiRestAPI(self)
else:
self.log.debug("Using tRPC API")
self.api = CivitaiTrpcAPI(self)
quality = self.config("quality")
if quality: