Skip to content

Commit

Permalink
Update wizard.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JabLuszko authored Sep 19, 2024
1 parent cd3fb2c commit b7d84ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mapadroid/mad_apk/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from apksearch.entities import PackageBase, PackageVariant
from apksearch.search import HEADERS
from apkutils.apkfile import BadZipFile, LargeZipFile
from bs4 import BeautifulSoup
from loguru import logger

from mapadroid.utils import global_variables
Expand Down Expand Up @@ -537,12 +538,13 @@ def normalize_package(self) -> NoReturn:
apk = apkutils.APK().from_io(bytes_of_apk).parse_resource()
manifest = apk.get_manifest()
try:
self.package_version = manifest['@android:versionName']
self.package_name = manifest['@package']
soup = BeautifulSoup(manifest, 'lxml-xml')
self.package_version = soup.manifest['android:versionName']
self.package_name = soup.manifest['package']
except KeyError:
pass
try:
filename = manifest['@split']
filename = soup.manifest['@split']
if filename[-3:] == 'dpi':
continue
except KeyError:
Expand Down

0 comments on commit b7d84ae

Please sign in to comment.