From 3a058a7f93a89a5cc09d4798f5631f24892ef599 Mon Sep 17 00:00:00 2001 From: AlexAplin Date: Sun, 11 Aug 2024 03:21:04 -0400 Subject: [PATCH] Clarify authed user for user mylists request --- nndownload/nndownload.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nndownload/nndownload.py b/nndownload/nndownload.py index 874f946..e03d213 100644 --- a/nndownload/nndownload.py +++ b/nndownload/nndownload.py @@ -1155,9 +1155,12 @@ def request_mylist(session: requests.Session, mylist_id: AnyStr, is_authed_user: def request_user_mylists(session: requests.Session, user_id: AnyStr): """Request mylists associated with a user.""" - output("Requesting mylists from user {0}...\n".format(user_id), logging.INFO) - is_authed_user = True if user_id == "me" else False + if not is_authed_user: + output("Requesting mylists from user {0}...\n".format(user_id), logging.INFO) + else: + output("Requesting mylists from logged in user...\n", logging.INFO) + mylists_request = session.get(USER_MYLISTS_API.format(user_id), headers=API_HEADERS) mylists_request.raise_for_status() user_mylists_json = json.loads(mylists_request.text)