Skip to content

Commit

Permalink
[Screenshot] fix tor download url
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Sep 24, 2024
1 parent f281154 commit fba53af
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions screenshot/common/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class DriverManager:
"https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-{version}.en-US.{system}.{ext}"
)
TOR_EXPERT_BUNDLE_URL: ClassVar[str] = (
"https://archive.org/download/seina-ext-tor/tor-{system}.{ext}"
"https://archive.org/download/tor-expert-bundle/tor-expert-bundle-{system}.{ext}"
)

def __init__(self, session: Optional[aiohttp.ClientSession] = None) -> None:
Expand Down Expand Up @@ -147,11 +147,7 @@ def get_firefox_download_url(self, version: str) -> str:

def get_tor_download_url(self) -> str:
return self.TOR_EXPERT_BUNDLE_URL.format(
system=(
"expert-bundle-{}".format(os)
if (os := self.get_os()) != "linux-aarch64"
else "linux-aarch64"
),
system=self.get_os(),
ext="tar.bz2" if self.get_os().startswith("linux-aarch64") else "tar.gz",
)

Expand Down

0 comments on commit fba53af

Please sign in to comment.