diff options
| author | 2025-08-25 02:01:07 -0400 | |
|---|---|---|
| committer | 2025-08-25 02:01:07 -0400 | |
| commit | 1df55d9de48105dace9cc16f1511dba3c9a6da6f (patch) | |
| tree | 6f6af90bd15a453d7fd1f5253cf01e1db801222f /gallery_dl/extractor/civitai.py | |
| parent | 3c1539bde1b47fff0ba81c9d92801fa700fedc3b (diff) | |
New upstream version 1.30.5.upstream/1.30.5
Diffstat (limited to 'gallery_dl/extractor/civitai.py')
| -rw-r--r-- | gallery_dl/extractor/civitai.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gallery_dl/extractor/civitai.py b/gallery_dl/extractor/civitai.py index 00400ba..d5cf996 100644 --- a/gallery_dl/extractor/civitai.py +++ b/gallery_dl/extractor/civitai.py @@ -912,9 +912,16 @@ class CivitaiSearchAPI(): def __init__(self, extractor): self.extractor = extractor self.root = "https://search-new.civitai.com" + + if auth := extractor.config("token"): + if " " not in auth: + auth = f"Bearer {auth}" + else: + auth = ("Bearer 8c46eb2508e21db1e9828a97968d" + "91ab1ca1caa5f70a00e88a2ba1e286603b61") + self.headers = { - "Authorization": "Bearer 8c46eb2508e21db1e9828a97968d91ab1ca1caa5f" - "70a00e88a2ba1e286603b61", + "Authorization": auth, "Content-Type": "application/json", "X-Meilisearch-Client": "Meilisearch instant-meilisearch (v0.13.5)" " ; Meilisearch JavaScript (v0.34.0)", |
