Include some default excludes
This commit is contained in:
parent
2f50009020
commit
639304f311
|
@ -394,12 +394,14 @@ def fetch_usernames_with_favs(danbooru_url, api_key, username, limit=10):
|
||||||
return users_with_favs
|
return users_with_favs
|
||||||
|
|
||||||
|
|
||||||
def fetch_user_favorites(danbooru_url, api_key, username, user, limit=10):
|
def fetch_user_favorites(
|
||||||
|
danbooru_url, api_key, username, user, limit=10, exclude="-vore - hyper -gore"
|
||||||
|
):
|
||||||
url = f"{danbooru_url}/posts.json"
|
url = f"{danbooru_url}/posts.json"
|
||||||
|
|
||||||
# Query for the user's favorites using the `ordfav:<username>` tag
|
# Query for the user's favorites using the `ordfav:<username>` tag
|
||||||
params = {
|
params = {
|
||||||
"tags": f"ordfav:{user}", # Fetch posts favorited by the user
|
"tags": f"ordfav:{user} {exclude}", # Fetch posts favorited by the user
|
||||||
"limit": limit, # Number of favorites to fetch
|
"limit": limit, # Number of favorites to fetch
|
||||||
"login": username,
|
"login": username,
|
||||||
"api_key": api_key,
|
"api_key": api_key,
|
||||||
|
|
Loading…
Reference in New Issue