🐛 Status Scrapper not scrapping icon from apkcombo (#320)

This commit is contained in:
Nikhil Badyal
2023-08-26 15:17:32 +05:30
committed by GitHub
parent 048f1affd8
commit 216b498a81
3 changed files with 58 additions and 31 deletions
+8
View File
@@ -1,12 +1,20 @@
"""APK Sources used."""
APK_MIRROR_BASE_URL = "https://www.apkmirror.com"
APK_MIRROR_BASE_APK_URL = f"{APK_MIRROR_BASE_URL}/apk"
APK_MIRROR_PACKAGE_URL = f"{APK_MIRROR_BASE_URL}/?s=" + "{}"
APK_MIRROR_APK_CHECK = f"{APK_MIRROR_BASE_URL}/wp-json/apkm/v1/app_exists/"
UPTODOWN_BASE_URL = "https://{}.en.uptodown.com/android"
APK_PURE_BASE_URL = "https://d.apkpure.com/b/APK"
APK_PURE_URL = APK_PURE_BASE_URL + "/{}?version=latest"
APKS_SOS_BASE_URL = "https://apksos.com/download-app"
APK_SOS_URL = APKS_SOS_BASE_URL + "/{}"
GITHUB_BASE_URL = "https://github.com"
PLAY_STORE_BASE_URL = "https://play.google.com"
PLAY_STORE_APK_URL = f"{PLAY_STORE_BASE_URL}/store/apps/details?id=" + "{}"
APK_COMBO_BASE_URL = "https://apkcombo.com"
APK_COMBO_GENERIC_URL = APK_COMBO_BASE_URL + "/genericApp/{}"
not_found_icon = "https://img.icons8.com/bubbles/500/android-os.png"
revanced_api = "https://releases.revanced.app/patches"
apk_sources = {
"backdrops": f"{APK_MIRROR_BASE_APK_URL}/backdrops/backdrops-wallpapers/",
"bacon": f"{APK_MIRROR_BASE_APK_URL}/onelouder-apps/baconreader-for-reddit/",
+2 -3
View File
@@ -11,6 +11,7 @@ from loguru import logger
from requests import Response
from src.config import RevancedConfig
from src.downloader.sources import APK_MIRROR_APK_CHECK
from src.downloader.utils import status_code_200
from src.exceptions import DownloadError
@@ -19,7 +20,6 @@ default_build = [
"youtube_music",
]
possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
apk_mirror_base_url = "https://www.apkmirror.com"
request_header = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (HTML, like Gecko)"
@@ -212,9 +212,8 @@ def apkmirror_status_check(package_name: str) -> Any:
-------
the response from the APKMirror API as a JSON object.
"""
api_url = f"{apk_mirror_base_url}/wp-json/apkm/v1/app_exists/"
body = {"pnames": [package_name]}
response = requests.post(api_url, json=body, headers=request_header, timeout=60)
response = requests.post(APK_MIRROR_APK_CHECK, json=body, headers=request_header, timeout=60)
return response.json()