correcting pixiv connection functionality

This commit is contained in:
2026-02-04 12:45:31 -05:00
parent cc19bbd372
commit 2190a9c16b
8 changed files with 315 additions and 13 deletions
+8
View File
@@ -387,6 +387,8 @@ class GalleryDLService:
"please login",
"must be logged in",
"authentication required",
"authenticationerror",
"refresh-token", # Pixiv OAuth
"session expired",
"invalid cookie",
"cookies are expired",
@@ -560,6 +562,12 @@ class GalleryDLService:
config["extractor"]["discord"] = {}
config["extractor"]["discord"]["token"] = auth_token
# Add refresh token for Pixiv
if auth_token and platform == "pixiv":
if "pixiv" not in config["extractor"]:
config["extractor"]["pixiv"] = {}
config["extractor"]["pixiv"]["refresh-token"] = auth_token
# Write temporary config file
with tempfile.NamedTemporaryFile(
mode="w",