feat: add e621

This commit is contained in:
Kat Inskip 2025-02-28 00:04:32 -08:00
parent a3beecbfaa
commit 7d398cc824
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
3 changed files with 71 additions and 3 deletions

View file

@ -12,7 +12,7 @@ Turn a list of tags and a count into a list of URLs to download from
:param user_tags: A list of tags to search for
:returns: A list of URLs to download from
"""
def request_posts(count: int, tags: list) -> list:
def request_posts(count: int, tags: list, config={}) -> list:
logging.debug(f"request_posts() called with count={count}, tags=[{', '.join(tags)}]")
# Make sure we get a different result every time by using "order:random" as a tag
if "order:random" not in tags:
@ -62,4 +62,4 @@ def handle(count: int, tags: list) -> list:
urls.append(post["file_url"])
files = download_files(urls)
# Return the downloaded files
return files, posts
return files, posts