Skip to content

Commit

Permalink
✨ Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed Mar 5, 2024
1 parent e1e1787 commit e8535a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions harambe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async def capture_download(
async with self.page.expect_download() as download_info:
await clickable.click()
download = await download_info.value
await download.path() # This will wait for the download to complete
await download.path() # This will wait for the download to complete

return await self._downloader.on_download(download)

Expand Down Expand Up @@ -196,7 +196,7 @@ async def run(
viewport={"width": 1280, "height": 1024},
ignore_https_errors=True,
user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
" (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
" (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
)
ctx.set_default_timeout(60000)

Expand Down
5 changes: 4 additions & 1 deletion harambe/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ async def on_download(self, download: Download) -> DownloadMeta:
class LoggingDownloader(Downloader):
async def on_download(self, download: Download) -> DownloadMeta:
print("on_download", download) # TODO: use logger
return {"url": str(await download.path()), "filename": download.suggested_filename}
return {
"url": str(await download.path()),
"filename": download.suggested_filename,
}

0 comments on commit e8535a3

Please sign in to comment.