From 94c26b230b231c967be958789cdaa16211da4b10 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Fri, 26 Mar 2021 10:10:28 -0600 Subject: ask for all the info at once --- noRMS-apk.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/noRMS-apk.py b/noRMS-apk.py index 425b225..a3039c3 100644 --- a/noRMS-apk.py +++ b/noRMS-apk.py @@ -56,9 +56,11 @@ for package in all_packages.splitlines(): rms_count = 0 -for origin in origins: - info_webpage = subprocess.check_output(['apk', 'info', '-w', origin], text=True) - webpage = info_webpage.splitlines()[1] +origin_keys = list(origins.keys()) +info_output = subprocess.check_output(['apk', 'info', '-w', *origin_keys], text=True) +info_pieces = info_output.split('\n\n') +for origin, info in zip(origin_keys, info_pieces): + webpage = info.splitlines()[1] parsed_url = urllib.parse.urlparse(webpage) host = parsed_url.netloc if verbose >= 1: -- cgit v1.2.3