[deviantart] fix username for 'watch' results (#794)

before it'd use "/" as username
This commit is contained in:
Mike Fährmann
2021-03-22 22:14:21 +01:00
parent 91c2e15da9
commit 139fb84108

View File

@@ -731,9 +731,8 @@ class DeviantartPopularExtractor(DeviantartExtractor):
class DeviantartWatchExtractor(DeviantartExtractor): class DeviantartWatchExtractor(DeviantartExtractor):
"""Extractor for Deviations from watched users""" """Extractor for Deviations from watched users"""
subcategory = "watch" subcategory = "watch"
directory_fmt = ("{category}", "{author[username]}")
pattern = (r"(?:https?://)?(?:www\.)?deviantart\.com" pattern = (r"(?:https?://)?(?:www\.)?deviantart\.com"
r"(/)(?:watch/deviations|notifications/watch)") r"/(?:watch/deviations|notifications/watch)()()")
test = ( test = (
("https://www.deviantart.com/watch/deviations"), ("https://www.deviantart.com/watch/deviations"),
("https://www.deviantart.com/notifications/watch"), ("https://www.deviantart.com/notifications/watch"),
@@ -746,8 +745,7 @@ class DeviantartWatchExtractor(DeviantartExtractor):
class DeviantartWatchPostsExtractor(DeviantartExtractor): class DeviantartWatchPostsExtractor(DeviantartExtractor):
"""Extractor for Posts from watched users""" """Extractor for Posts from watched users"""
subcategory = "watch-posts" subcategory = "watch-posts"
directory_fmt = ("{category}", "{author[username]}") pattern = r"(?:https?://)?(?:www\.)?deviantart\.com/watch/posts()()"
pattern = r"(?:https?://)?(?:www\.)?deviantart\.com(/)watch/posts"
test = ("https://www.deviantart.com/watch/posts",) test = ("https://www.deviantart.com/watch/posts",)
def deviations(self): def deviations(self):