mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 12:29:19 -08:00
feat: add e621
This commit is contained in:
parent
a3beecbfaa
commit
7d398cc824
3 changed files with 71 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue