Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
try except for key error in coomer crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 18, 2024
1 parent 2227e65 commit cd9bb79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.33"
__version__ = "5.2.34"
5 changes: 4 additions & 1 deletion cyberdrop_dl/scraper/crawlers/coomer_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ async def handle_file(file_obj):
@error_handling_wrapper
async def handle_direct_link(self, scrape_item: ScrapeItem) -> None:
"""Handles a direct link"""
filename, ext = await get_filename_and_ext(scrape_item.url.query["f"])
try:
filename, ext = await get_filename_and_ext(scrape_item.url.query["f"])
except KeyError:
filename, ext = await get_filename_and_ext(scrape_item.url.name)
await self.handle_file(scrape_item.url, scrape_item, filename, ext)

"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
version = "5.2.33"
version = "5.2.34"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit cd9bb79

Please sign in to comment.