Skip to content

Commit

Permalink
[nijie] add 'feed' extractor (#3048)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 14, 2022
1 parent d1314df commit c4a62a4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -1046,13 +1046,13 @@ Consider all sites to be NSFW unless otherwise known.
<tr>
<td>nijie</td>
<td>https://nijie.info/</td>
<td>Doujin, Favorites, Illustrations, individual Images, Nuita History, User Profiles</td>
<td>Doujin, Favorites, Feeds, Illustrations, individual Images, Nuita History, User Profiles</td>
<td>Required</td>
</tr>
<tr>
<td>horne</td>
<td>https://horne.red/</td>
<td>Doujin, Favorites, Illustrations, individual Images, Nuitas, User Profiles</td>
<td>Doujin, Favorites, Feeds, Illustrations, individual Images, Nuitas, User Profiles</td>
<td>Required</td>
</tr>

Expand Down
20 changes: 20 additions & 0 deletions gallery_dl/extractor/nijie.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,26 @@ def _extract_user_name(page):
page, "<title>", "さんの抜いた")[0] or "")


class NijieFeedExtractor(NijieExtractor):
"""Extractor for nijie liked user feed"""
subcategory = "feed"
pattern = BASE_PATTERN + r"/like_user_view\.php"
test = (
("https://nijie.info/like_user_view.php", {
"range": "1-10",
"count": 10,
}),
("https://horne.red/like_user_view.php"),
)

def image_ids(self):
return self._pagination("like_user_view")

@staticmethod
def _extract_user_name(page):
return ""


class NijieImageExtractor(NijieExtractor):
"""Extractor for a nijie work/image"""
subcategory = "image"
Expand Down

0 comments on commit c4a62a4

Please sign in to comment.