mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 11:41:35 +01:00
[artstation] add 'following' extractor (closes #888)
This commit is contained in:
parent
3855d0dd3c
commit
d594977ca1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user