Skip to content

Commit

Permalink
✨ Add filename override possibility
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed Jun 5, 2024
1 parent e565019 commit 720d7d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion harambe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ async def capture_url(
async def capture_download(
self,
clickable: ElementHandle,
override_filename: str | None = None,
) -> DownloadMeta:
"""
Capture the download of a click event. This will click the element, download the resulting file
Expand All @@ -212,7 +213,7 @@ async def capture_download(
res = await self._notify_observers(
"on_download",
download.url,
download.suggested_filename,
override_filename if override_filename else download.suggested_filename,
content,
check_duplication=False,
)
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 = "harambe-sdk"
version = "0.13.1"
version = "0.13.2"
description = "Data extraction SDK for Playwright 🐒🍌"
authors = ["awtkns <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 720d7d5

Please sign in to comment.