Google Recorder source to Uptodown (#277)

This commit is contained in:
Việt Huỳnh
2023-08-15 00:47:16 +07:00
committed by GitHub
parent 06c0ec3908
commit a373242773
3 changed files with 18 additions and 14 deletions
+6 -2
View File
@@ -27,7 +27,9 @@ class UptoDown(Downloader):
:return: Version of downloaded apk
"""
logger.debug("downloading specified version of app from uptodown.")
url = f"https://{app}.en.uptodown.com/android/versions"
url = (
f"https://{self.config.upto_down.get(app)}.en.uptodown.com/android/versions"
)
html = self.config.session.get(url).text
soup = BeautifulSoup(html, "html.parser")
versions_list = soup.find("section", {"id": "versions"})
@@ -43,5 +45,7 @@ class UptoDown(Downloader):
logger.debug(f"Downloaded {app} apk from upto_down_downloader in rt")
def latest_version(self, app: str, **kwargs: Any) -> None:
page = f"https://{app}.en.uptodown.com/android/download"
page = (
f"https://{self.config.upto_down.get(app)}.en.uptodown.com/android/download"
)
self.extract_download_link(page, app)