diff --git a/gallery_dl/extractor/mastodon.py b/gallery_dl/extractor/mastodon.py index cb94481e..3c2b03ee 100644 --- a/gallery_dl/extractor/mastodon.py +++ b/gallery_dl/extractor/mastodon.py @@ -131,8 +131,8 @@ class MastodonBookmarkExtractor(MastodonExtractor): class MastodonFollowingExtractor(MastodonExtractor): """Extractor for followed mastodon users""" subcategory = "following" - pattern = BASE_PATTERN + r"/users/([^/?#]+)/following" - example = "https://mastodon.social/users/USER/following" + pattern = BASE_PATTERN + r"/(?:@|users/)([^/?#]+)/following" + example = "https://mastodon.social/@USER/following" def items(self): api = MastodonAPI(self) diff --git a/test/results/mastodonsocial.py b/test/results/mastodonsocial.py index a7001fd0..2ad0dc20 100644 --- a/test/results/mastodonsocial.py +++ b/test/results/mastodonsocial.py @@ -70,6 +70,12 @@ __tests__ = ( "#extractor": False, }, +{ + "#url" : "https://mastodon.social/@0x4f/following", + "#category": ("mastodon", "mastodon.social", "following"), + "#class" : mastodon.MastodonFollowingExtractor, +}, + { "#url" : "https://mastodon.social/users/id:10843/following", "#category": ("mastodon", "mastodon.social", "following"),