mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
[inkbunny] improve '/submissionsviewall.php' patterns (#4934)
allow 'mode=…' to be in any position don't require it to be somewhere in the middle
This commit is contained in:
parent
3f9c113d78
commit
99aa923322
@ -103,7 +103,8 @@ class InkbunnyPoolExtractor(InkbunnyExtractor):
|
||||
subcategory = "pool"
|
||||
pattern = (BASE_PATTERN + r"/(?:"
|
||||
r"poolview_process\.php\?pool_id=(\d+)|"
|
||||
r"submissionsviewall\.php\?([^#]+&mode=pool&[^#]+))")
|
||||
r"submissionsviewall\.php"
|
||||
r"\?((?:[^#]+&)?mode=pool(?:&[^#]+)?))")
|
||||
example = "https://inkbunny.net/poolview_process.php?pool_id=12345"
|
||||
|
||||
def __init__(self, match):
|
||||
@ -133,7 +134,8 @@ class InkbunnyFavoriteExtractor(InkbunnyExtractor):
|
||||
subcategory = "favorite"
|
||||
pattern = (BASE_PATTERN + r"/(?:"
|
||||
r"userfavorites_process\.php\?favs_user_id=(\d+)|"
|
||||
r"submissionsviewall\.php\?([^#]+&mode=userfavs&[^#]+))")
|
||||
r"submissionsviewall\.php"
|
||||
r"\?((?:[^#]+&)?mode=userfavs(?:&[^#]+)?))")
|
||||
example = ("https://inkbunny.net/userfavorites_process.php"
|
||||
"?favs_user_id=12345")
|
||||
|
||||
@ -164,8 +166,8 @@ class InkbunnyFavoriteExtractor(InkbunnyExtractor):
|
||||
class InkbunnyUnreadExtractor(InkbunnyExtractor):
|
||||
"""Extractor for unread inkbunny submissions"""
|
||||
subcategory = "unread"
|
||||
pattern = (BASE_PATTERN +
|
||||
r"/submissionsviewall\.php\?([^#]+&mode=unreadsubs&[^#]+)")
|
||||
pattern = (BASE_PATTERN + r"/submissionsviewall\.php"
|
||||
r"\?((?:[^#]+&)?mode=unreadsubs(?:&[^#]+)?)")
|
||||
example = ("https://inkbunny.net/submissionsviewall.php"
|
||||
"?text=&mode=unreadsubs&type=")
|
||||
|
||||
@ -184,8 +186,8 @@ class InkbunnyUnreadExtractor(InkbunnyExtractor):
|
||||
class InkbunnySearchExtractor(InkbunnyExtractor):
|
||||
"""Extractor for inkbunny search results"""
|
||||
subcategory = "search"
|
||||
pattern = (BASE_PATTERN +
|
||||
r"/submissionsviewall\.php\?([^#]+&mode=search&[^#]+)")
|
||||
pattern = (BASE_PATTERN + r"/submissionsviewall\.php"
|
||||
r"\?((?:[^#]+&)?mode=search(?:&[^#]+)?)")
|
||||
example = ("https://inkbunny.net/submissionsviewall.php"
|
||||
"?text=TAG&mode=search&type=")
|
||||
|
||||
@ -221,7 +223,8 @@ class InkbunnyFollowingExtractor(InkbunnyExtractor):
|
||||
subcategory = "following"
|
||||
pattern = (BASE_PATTERN + r"/(?:"
|
||||
r"watchlist_process\.php\?mode=watching&user_id=(\d+)|"
|
||||
r"usersviewall\.php\?([^#]+&mode=watching&[^#]+))")
|
||||
r"usersviewall\.php"
|
||||
r"\?((?:[^#]+&)?mode=watching(?:&[^#]+)?))")
|
||||
example = ("https://inkbunny.net/watchlist_process.php"
|
||||
"?mode=watching&user_id=12345")
|
||||
|
||||
|
@ -78,6 +78,12 @@ __tests__ = (
|
||||
"#class" : inkbunny.InkbunnyPoolExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/submissionsviewall.php?mode=pool&pool_id=28985",
|
||||
"#category": ("", "inkbunny", "pool"),
|
||||
"#class" : inkbunny.InkbunnyPoolExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/userfavorites_process.php?favs_user_id=20969",
|
||||
"#category": ("", "inkbunny", "favorite"),
|
||||
@ -94,12 +100,24 @@ __tests__ = (
|
||||
"#class" : inkbunny.InkbunnyFavoriteExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/submissionsviewall.php?mode=userfavs&user_id=20969",
|
||||
"#category": ("", "inkbunny", "favorite"),
|
||||
"#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?mode=unreadsubs",
|
||||
"#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"),
|
||||
@ -120,6 +138,12 @@ __tests__ = (
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/submissionsviewall.php?mode=search",
|
||||
"#category": ("", "inkbunny", "search"),
|
||||
"#class" : inkbunny.InkbunnySearchExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/watchlist_process.php?mode=watching&user_id=20969",
|
||||
"#category": ("", "inkbunny", "following"),
|
||||
@ -134,6 +158,12 @@ __tests__ = (
|
||||
"#class" : inkbunny.InkbunnyFollowingExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/usersviewall.php?mode=watching&user_id=20969",
|
||||
"#category": ("", "inkbunny", "following"),
|
||||
"#class" : inkbunny.InkbunnyFollowingExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://inkbunny.net/s/1829715",
|
||||
"#category": ("", "inkbunny", "post"),
|
||||
|
Loading…
Reference in New Issue
Block a user