mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
♻️ Chore
This commit is contained in:
@@ -109,6 +109,11 @@ class Downloader(object):
|
||||
:param file_name: name of the file after downloading
|
||||
"""
|
||||
logger.debug(f"Trying to download {name} from github")
|
||||
if self.config.dry_run:
|
||||
logger.debug(
|
||||
f"Skipping download of {file_name}. File already exists or dry running."
|
||||
)
|
||||
return
|
||||
repo_url = f"https://api.github.com/repos/{owner}/{name}/releases/latest"
|
||||
headers = {
|
||||
"Content-Type": "application/vnd.github.v3+json",
|
||||
@@ -129,7 +134,7 @@ class Downloader(object):
|
||||
|
||||
def download_revanced(self) -> None:
|
||||
"""Download Revanced and Extended Patches, Integration and CLI."""
|
||||
if os.path.exists("changelog.md"):
|
||||
if os.path.exists("changelog.md") and not self.config.dry_run:
|
||||
logger.debug("Deleting old changelog.md")
|
||||
os.remove("changelog.md")
|
||||
assets = [
|
||||
|
||||
@@ -35,7 +35,6 @@ class UptoDown(Downloader):
|
||||
extracted_version = version_item.find("span", {"class": "version"}).text
|
||||
if extracted_version == version:
|
||||
download_url = version_item["data-url"]
|
||||
print(f"data-url for version {version}: {download_url}")
|
||||
break
|
||||
if download_url is None:
|
||||
raise AppNotFound(f"Unable to get download url for {app}")
|
||||
|
||||
Reference in New Issue
Block a user