diff options
| author | 2020-07-20 01:03:23 -0400 | |
|---|---|---|
| committer | 2020-07-20 01:03:23 -0400 | |
| commit | ba039cfb2e1ba2522ee0a0fa2a84a1a6579e4877 (patch) | |
| tree | 2e057b8e83968c7ab951b1b60aa16b71682f5414 /gallery_dl/extractor/artstation.py | |
| parent | 02dd2886783cd303cff6890a741152d013bb00ce (diff) | |
New upstream version 1.14.3.upstream/1.14.3
Diffstat (limited to 'gallery_dl/extractor/artstation.py')
| -rw-r--r-- | gallery_dl/extractor/artstation.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gallery_dl/extractor/artstation.py b/gallery_dl/extractor/artstation.py index 64a4bf4..985ad48 100644 --- a/gallery_dl/extractor/artstation.py +++ b/gallery_dl/extractor/artstation.py @@ -380,3 +380,21 @@ class ArtstationImageExtractor(ArtstationExtractor): def get_project_assets(self, project_id): return self.assets + + +class ArtstationFollowingExtractor(ArtstationExtractor): + """Extractor for a user's followed users""" + subcategory = "following" + pattern = (r"(?:https?://)?(?:www\.)?artstation\.com" + r"/(?!artwork|projects|search)([^/?&#]+)/following") + test = ("https://www.artstation.com/gaerikim/following", { + "pattern": ArtstationUserExtractor.pattern, + "count": ">= 50", + }) + + def items(self): + url = "{}/users/{}/following.json".format(self.root, self.user) + for user in self._pagination(url): + url = "{}/{}".format(self.root, user["username"]) + user["_extractor"] = ArtstationUserExtractor + yield Message.Queue, url, user |
