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

Commit

Permalink
Minor fixes and line removals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed May 22, 2024
1 parent 14fe2d7 commit 1382961
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 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.17"
__version__ = "5.3.18"
8 changes: 6 additions & 2 deletions cyberdrop_dl/scraper/crawlers/cyberdrop_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class CyberdropCrawler(Crawler):
def __init__(self, manager: Manager):
super().__init__(manager, "cyberdrop", "Cyberdrop")
self.api_url = URL("https://cyberdrop.me/api/")
self.api_url = URL("https://api.cyberdrop.me/api/")
self.primary_base_url = URL("https://cyberdrop.me/")
self.request_limiter = AsyncLimiter(1.0, 2.0)

Expand Down Expand Up @@ -62,9 +62,13 @@ async def file(self, scrape_item: ScrapeItem) -> None:
return

async with self.request_limiter:
JSON_Resp = await self.client.get_json(self.domain, self.api_url / "f" / scrape_item.url.path[3:])
JSON_Resp = await self.client.get_json(self.domain, self.api_url / "file" / "info" / scrape_item.url.path[3:])

filename, ext = await get_filename_and_ext(JSON_Resp["name"])

async with self.request_limiter:
JSON_Resp = await self.client.get_json(self.domain, self.api_url / "file" / "auth" / scrape_item.url.path[3:])

link = URL(JSON_Resp['url'])
await self.handle_file(link, scrape_item, filename, ext)

Expand Down
1 change: 0 additions & 1 deletion cyberdrop_dl/scraper/crawlers/cyberfile_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ async def shared(self, scrape_item: ScrapeItem) -> None:
node_id = str(new_folders.pop(0))
page = 1


@error_handling_wrapper
async def file(self, scrape_item: ScrapeItem) -> None:
"""Scrapes a file"""
Expand Down
2 changes: 0 additions & 2 deletions cyberdrop_dl/utils/args/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ def parse_args() -> argparse.Namespace:
ui_options.add_argument("--scraping-item-limit", type=int, help="number of lines to allow for scraping items before overflow (default: %(default)s)", default=5)
ui_options.add_argument("--downloading-item-limit", type=int, help="number of lines to allow for downloading items before overflow (default: %(default)s)", default=5)



# Links
parser.add_argument("links", metavar="link", nargs="*", help="link to content to download (passing multiple links is supported)", default=[])
return parser.parse_args()
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.17"
version = "5.3.18"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 1382961

Please sign in to comment.