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

Commit

Permalink
Restrict Coomer to 1/s
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed May 22, 2024
1 parent 1382961 commit dfb6c14
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 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.3.18"
__version__ = "5.3.19"
6 changes: 3 additions & 3 deletions cyberdrop_dl/clients/scraper_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def __init__(self, client_manager: ClientManager) -> None:
self.trace_configs = []
if os.getenv("PYCHARM_HOSTED") is not None:
async def on_request_start(session, trace_config_ctx, params):
await log(f"Starting scrape {params.method} request to {params.url}", 40)
await log(f"Starting scrape {params.method} request to {params.url}", 10)

async def on_request_end(session, trace_config_ctx, params):
await log(f"Finishing scrape {params.method} request to {params.url}", 40)
await log(f"Response status for {params.url}: {params.response.status}", 40)
await log(f"Finishing scrape {params.method} request to {params.url}", 10)
await log(f"Response status for {params.url}: {params.response.status}", 10)

trace_config = aiohttp.TraceConfig()
trace_config.on_request_start.append(on_request_start)
Expand Down
7 changes: 4 additions & 3 deletions cyberdrop_dl/managers/client_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ def __init__(self, manager: Manager):
self.domain_rate_limits = {
"bunkrr": AsyncLimiter(5, 1),
"cyberdrop": AsyncLimiter(5, 1),
"coomer": AsyncLimiter(10, 1),
"kemono": AsyncLimiter(10, 1),
"coomer": AsyncLimiter(1, 1),
"kemono": AsyncLimiter(1, 1),
"pixeldrain": AsyncLimiter(10, 1),
"other": AsyncLimiter(25, 1)
}
self.download_spacer = {'bunkr': 0.5, 'bunkrr': 0.5, 'cyberdrop': 0, 'coomer': 0, 'cyberfile': 0, "pixeldrain": 0}

self.download_spacer = {'bunkr': 0.5, 'bunkrr': 0.5, 'cyberdrop': 0, 'cyberfile': 0, "pixeldrain": 0, "coomer": 0.5, "kemono": 0.5}

self.global_rate_limiter = AsyncLimiter(self.rate_limit, 1)
self.session_limit = asyncio.Semaphore(50)
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.3.18"
version = "5.3.19"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit dfb6c14

Please sign in to comment.