[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.
This commit is contained in:
Mike Fährmann
2019-10-24 21:42:10 +02:00
parent 2eb38810c5
commit 9e3a8607ee

View File

@@ -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():