mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
Merge pull request #106 from nikhilbadyal/download-from-apkmirror [skip ci]
✨ Download apks from apkmirror instead of uptodown
This commit is contained in:
+7
-3
@@ -166,9 +166,13 @@ class Downloader(object):
|
||||
logger.debug("Invalid app")
|
||||
sys.exit(1)
|
||||
parser = LexborHTMLParser(self.config.session.get(page).text)
|
||||
main_page = parser.css_first(".appRowVariantTag>.accent_color").attributes[
|
||||
"href"
|
||||
]
|
||||
try:
|
||||
main_page = parser.css_first(".appRowVariantTag>.accent_color").attributes[
|
||||
"href"
|
||||
]
|
||||
except AttributeError:
|
||||
# Handles a case when variants are not available
|
||||
main_page = parser.css_first(".downloadLink").attributes["href"]
|
||||
match = re.search(r"\d", main_page)
|
||||
if not match:
|
||||
logger.error("Cannot find app main page")
|
||||
|
||||
Reference in New Issue
Block a user