mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
[inkbunny] add 'unread' extractor (#4934)
This commit is contained in:
parent
8b87a5330d
commit
2852404e49
@ -400,7 +400,7 @@ Consider all listed sites to potentially be NSFW.
|
||||
<tr>
|
||||
<td>Inkbunny</td>
|
||||
<td>https://inkbunny.net/</td>
|
||||
<td>Favorites, Followed Users, Pools, Posts, Search Results, User Profiles</td>
|
||||
<td>Favorites, Followed Users, Pools, Posts, Search Results, Unread Submissions, User Profiles</td>
|
||||
<td>Supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -161,6 +161,26 @@ class InkbunnyFavoriteExtractor(InkbunnyExtractor):
|
||||
return self.api.search(params)
|
||||
|
||||
|
||||
class InkbunnyUnreadExtractor(InkbunnyExtractor):
|
||||
"""Extractor for unread inkbunny submissions"""
|
||||
subcategory = "unread"
|
||||
pattern = (BASE_PATTERN +
|
||||
r"/submissionsviewall\.php\?([^#]+&mode=unreadsubs&[^#]+)")
|
||||
example = ("https://inkbunny.net/submissionsviewall.php"
|
||||
"?text=&mode=unreadsubs&type=")
|
||||
|
||||
def __init__(self, match):
|
||||
InkbunnyExtractor.__init__(self, match)
|
||||
self.params = text.parse_query(match.group(1))
|
||||
|
||||
def posts(self):
|
||||
params = self.params.copy()
|
||||
params.pop("rid", None)
|
||||
params.pop("mode", None)
|
||||
params["unread_submissions"] = "yes"
|
||||
return self.api.search(params)
|
||||
|
||||
|
||||
class InkbunnySearchExtractor(InkbunnyExtractor):
|
||||
"""Extractor for inkbunny search results"""
|
||||
subcategory = "search"
|
||||
|
@ -192,6 +192,9 @@ SUBCATEGORY_MAP = {
|
||||
"imgur": {
|
||||
"favorite-folder": "Favorites Folders",
|
||||
},
|
||||
"inkbunny": {
|
||||
"unread": "Unread Submissions",
|
||||
},
|
||||
"instagram": {
|
||||
"posts": "",
|
||||
"saved": "Saved Posts",
|
||||
|
@ -94,6 +94,12 @@ __tests__ = (
|
||||
"#class" : inkbunny.InkbunnyFavoriteExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/submissionsviewall.php?rid=ffffffffff&mode=unreadsubs&page=1&orderby=unread_datetime",
|
||||
"#category": ("", "inkbunny", "unread"),
|
||||
"#class" : inkbunny.InkbunnyUnreadExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/submissionsviewall.php?rid=ffffffffff&mode=search&page=1&orderby=create_datetime&text=cute&stringtype=and&keywords=yes&title=yes&description=no&artist=&favsby=&type=&days=&keyword_id=&user_id=&random=&md5=",
|
||||
"#category": ("", "inkbunny", "search"),
|
||||
|
Loading…
Reference in New Issue
Block a user