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

Commit

Permalink
Fix gofile sub-folder scraping
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 5, 2024
1 parent 6924422 commit 3632edd
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.2.17"
__version__ = "5.2.18"
6 changes: 3 additions & 3 deletions cyberdrop_dl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ async def director(manager: Manager) -> None:
file_handler_debug.setFormatter(formatter)
logger_debug.addHandler(file_handler_debug)

aiosqlite_log = logging.getLogger("aiosqlite")
aiosqlite_log.setLevel(manager.config_manager.settings_data['Runtime_Options']['log_level'])
aiosqlite_log.addHandler(file_handler_debug)
# aiosqlite_log = logging.getLogger("aiosqlite")
# aiosqlite_log.setLevel(manager.config_manager.settings_data['Runtime_Options']['log_level'])
# aiosqlite_log.addHandler(file_handler_debug)

while True:
logger = logging.getLogger("cyberdrop_dl")
Expand Down
3 changes: 2 additions & 1 deletion cyberdrop_dl/scraper/crawlers/gofile_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, manager: Manager):
super().__init__(manager, "gofile", "GoFile")
self.api_address = URL("https://api.gofile.io")
self.js_address = URL("https://gofile.io/dist/js/alljs.js")
self.primary_base_domain = URL("https://gofile.io")
self.token = ""
self.websiteToken = ""
self.headers = {}
Expand Down Expand Up @@ -69,7 +70,7 @@ async def album(self, scrape_item: ScrapeItem) -> None:
for content_id in contents:
content = contents[content_id]
if content["type"] == "folder":
new_scrape_item = await self.create_scrape_item(scrape_item, URL(content["name"]), title, True)
new_scrape_item = await self.create_scrape_item(scrape_item, self.primary_base_domain / "d" / content["code"], title, True)
self.manager.task_group.create_task(self.run(new_scrape_item))
continue
if content["link"] == "overloaded":
Expand Down
2 changes: 1 addition & 1 deletion cyberdrop_dl/utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def log(message: [str, Exception], level: int) -> None:
async def log_debug(message: [str, Exception], level: int) -> None:
"""Simple logging function"""
if DEBUG_VAR:
logger_debug.log(level, message)
logger_debug.log(level, message.encode('ascii', 'ignore').decode('ascii'))


async def log_with_color(message: str, style: str, level: int) -> None:
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.2.17"
version = "5.2.18"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 3632edd

Please sign in to comment.