Use year filter
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Michel Roux 2022-11-14 14:51:25 +01:00
parent cde3adcbe5
commit fc8cbd9540
1 changed files with 5 additions and 3 deletions

View File

@ -83,9 +83,8 @@ def get_files(id):
def search_ygg(query, multi):
year = args.year or ""
ygg_params = {
"name": f"{query} {year}",
"name": query,
"description": "",
"file": "",
"uploader": "",
@ -118,6 +117,9 @@ def search_ygg(query, multi):
if any(word.lower() in name for word in BLACKLIST_WORDS):
continue
if args.year and args.year not in name:
continue
if args.uploader and not any(
uploader.lower() in name for uploader in args.uploader
):
@ -129,7 +131,7 @@ def search_ygg(query, multi):
if get_files(id) > 1:
continue
print(f"{name} {year} {link}")
print(f"{name} {link}")
exit(0)