Don't download the same link several times
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
This commit is contained in:
parent
80348db530
commit
b65073b1f8
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,7 @@ class AutoResponder(commands.Cog):
|
|||
files = []
|
||||
self.log.info("Preparing to download: %s", ", ".join(map(ParseResult.geturl, links)))
|
||||
async with aiohttp.ClientSession() as session:
|
||||
for link in links:
|
||||
for link in set(links):
|
||||
if link.path.endswith(".pdf"):
|
||||
buffer = io.BytesIO()
|
||||
self.log.info("Downloading %s", link)
|
||||
|
|
Loading…
Reference in a new issue