[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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user