From 9e3a8607ee9eb8dbbafb7924f542e6080c14469b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 24 Oct 2019 21:42:10 +0200 Subject: [PATCH] [deviantart] update usernames (#455) In the case that a user changed his username, requesting deviations with an old name might cause problems (missing deviations, etc.) The internal 'username' value therefore now gets updated to the current username taken from the user profile. --- gallery_dl/extractor/deviantart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 3da94a1d..bcbc560f 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -58,9 +58,12 @@ class DeviantartExtractor(Extractor): def items(self): if self.user: - self.group = not self.api.user_profile(self.user) + profile = self.api.user_profile(self.user) + self.group = not profile if self.group: self.subcategory = "group-" + self.subcategory + else: + self.user = profile["user"]["username"] yield Message.Version, 1 for deviation in self.deviations():