Remove Google Drive from possible source

This commit is contained in:
Nikhil Badyal
2025-07-10 19:04:34 +05:30
parent b186214c6c
commit 551159046d
5 changed files with 1 additions and 44 deletions
+1 -4
View File
@@ -250,10 +250,7 @@ You can use any of the following methods to build.
5. APKMonk - Supports downloading any available version
1. Link Format - https://www.apkmonk.com/app/<package-name>/
2. Example Link - https://www.apkmonk.com/app/<package-name>/
6. Google Drive - Supports downloading from Google Drive lint
1. Link Format - https://drive.google.com/uc?<id>
2. Example Link - https://drive.google.com/uc?id=1ad44UTghbDty8o36Nrp3ZMyUzkPckIqY
7. APKEEP - Support downloading using [APKEEP](https://github.com/EFForg/apkeep)
6. APKEEP - Support downloading using [APKEEP](https://github.com/EFForg/apkeep)
1. Link Format - apkeep
2. Example Link - apkeep
Note - You need to provide APKEEP_EMAIL and APKEEP_TOKEN in the **DOCKER_PY_REVANCED_SECRETS** Github Secrets.
-1
View File
@@ -1,6 +1,5 @@
beautifulsoup4==4.13.4
environs==14.1.1
gdown @ git+https://github.com/nikhilbadyal/gdown
google-play-scraper==1.2.7
lastversion==3.5.7
loguru==0.7.3
-4
View File
@@ -8,14 +8,12 @@ from src.downloader.apkpure import ApkPure
from src.downloader.apksos import ApkSos
from src.downloader.download import Downloader
from src.downloader.github import Github
from src.downloader.google_drive import GoogleDrive
from src.downloader.sources import (
APK_MIRROR_BASE_URL,
APK_MONK_BASE_URL,
APK_PURE_BASE_URL,
APKEEP,
APKS_SOS_BASE_URL,
DRIVE_DOWNLOAD_BASE_URL,
GITHUB_BASE_URL,
UPTODOWN_SUFFIX,
)
@@ -47,8 +45,6 @@ class DownloaderFactory(object):
return ApkMirror(config)
if apk_source.startswith(APK_MONK_BASE_URL):
return ApkMonk(config)
if apk_source.startswith(DRIVE_DOWNLOAD_BASE_URL):
return GoogleDrive(config)
if apk_source.startswith(APKEEP):
return Apkeep(config)
msg = "No download factory found."
-32
View File
@@ -1,32 +0,0 @@
"""Google Drive downloader Class."""
from typing import Any, Self
import gdown
from src.app import APP
from src.downloader.download import Downloader
class GoogleDrive(Downloader):
"""Google Driver downloader."""
def specific_version(self: Self, app: APP, version: str) -> tuple[str, str]:
"""Function to download the specified version of app from apkmirror.
:param app: Name of the application
:param version: Version of the application to download
:return: Version of downloaded apk
"""
return self.latest_version(app)
def latest_version(self: Self, app: APP, **kwargs: Any) -> tuple[str, str]:
"""Function to download whatever the latest version of app from Google Driver.
:param app: Name of the application
:return: Version of downloaded apk
"""
url = app.download_source
file_name = f"{self.config.temp_folder_name}/{app.app_name}.apk"
_, download_url = gdown.download(url, quiet=False, use_cookies=False, output=file_name)
return file_name, download_url
-3
View File
@@ -22,9 +22,6 @@ APK_MONK_BASE_URL = "https://www.apkmonk.com"
APKEEP = "apkeep"
APK_MONK_APK_URL = APK_MONK_BASE_URL + "/app/{}/"
APK_MONK_ICON_URL = "https://cdn.apkmonk.com/logos/{}"
DRIVE_BASE_URL = "https://drive.google.com"
DRIVE_DOWNLOAD_BASE_URL = f"{DRIVE_BASE_URL}/uc?id="
DRIVE_DOWNLOAD_URL = DRIVE_DOWNLOAD_BASE_URL + "{}"
apk_sources = {
"backdrops": f"{APK_MIRROR_BASE_APK_URL}/backdrops/backdrops-wallpapers/",
"bacon": f"{APK_MIRROR_BASE_APK_URL}/onelouder-apps/baconreader-for-reddit/",