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

Commit

Permalink
Handling for reinforced bunkr links
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Feb 6, 2024
1 parent 3211825 commit 3016686
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 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.1.65"
__version__ = "5.1.66"
9 changes: 9 additions & 0 deletions cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ async def fetch(self, scrape_item: ScrapeItem) -> None:

await self.set_cookies()

if "get" in scrape_item.url.host:
scrape_item.url = await self.reinforced_link(scrape_item.url)
scrape_item.url = await self.get_stream_link(scrape_item.url)

if "a" in scrape_item.url.parts:
await self.album(scrape_item)
elif "v" in scrape_item.url.parts:
Expand Down Expand Up @@ -112,6 +116,8 @@ async def video(self, scrape_item: ScrapeItem) -> None:
except Exception as e:
if "get" in link.host:
link = await self.reinforced_link(link)
if not link:
return
filename, ext = await get_filename_and_ext(link.name)
else:
filename, ext = await get_filename_and_ext(scrape_item.url.name)
Expand All @@ -134,12 +140,15 @@ async def other(self, scrape_item: ScrapeItem) -> None:
except NoExtensionFailure:
if "get" in link.host:
link = await self.reinforced_link(link)
if not link:
return
filename, ext = await get_filename_and_ext(link.name)
else:
filename, ext = await get_filename_and_ext(scrape_item.url.name)

await self.handle_file(link, scrape_item, filename, ext)

@error_handling_wrapper
async def reinforced_link(self, url: URL) -> URL:
"""Gets the download link for a given reinforced URL"""
"""get.bunkr.su"""
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.1.65"
version = "5.1.66"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 3016686

Please sign in to comment.