Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: add GoFile salt envvar

NTFSvolume241305d8eddb
diff --git a/cyberdrop_dl/crawlers/gofile.py b/cyberdrop_dl/crawlers/gofile.py
index affdb9106..990a2e2bb 100644
--- a/cyberdrop_dl/crawlers/gofile.py
+++ b/cyberdrop_dl/crawlers/gofile.py
@@ -5,6 +5,7 @@ import time
from hashlib import sha256
from typing import TYPE_CHECKING, Any, ClassVar, Literal, NotRequired, TypedDict, TypeGuard
+from cyberdrop_dl import env
from cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths
from cyberdrop_dl.exceptions import PasswordProtectedError, ScrapeError
from cyberdrop_dl.url_objects import FILE_HOST_ALBUM, AbsoluteHttpURL, ScrapeItem
@@ -71,7 +72,7 @@ class GoFileCrawler(Crawler):
FOLDER_DOMAIN: ClassVar[str] = "GoFile"
_RATE_LIMIT: ClassVar[RateLimit] = 4, 10
- _SALT: ClassVar[str] = "g4f8fd9f12h14g"
+ _SALT: ClassVar[str] = env.GOFILE_SALT or "9844d94d963d30"
_BROWSER_LANG: ClassVar[str] = "en-US"
def __post_init__(self) -> None:
diff --git a/cyberdrop_dl/env.py b/cyberdrop_dl/env.py
index d034022d6..84eeb585b 100644
--- a/cyberdrop_dl/env.py
+++ b/cyberdrop_dl/env.py
@@ -41,6 +41,7 @@ EDITOR = os.getenv("EDITOR")
BANDCAMP_FORMATS = _env("BANDCAMP_FORMATS")
ENABLE_TWITTER = bool(_env("ENABLE_TWITTER"))
+GOFILE_SALT = _env("GOFILE_SALT")
ONEPACE_PREFER_DUB = bool(_env("ONEPACE_PREFER_DUB"))
CLYPIT_PREFER_MP3 = bool(_env("CLYPIT_PREFER_MP3"))