From 58b7b98c1245525c6c4c23cdcf3de1a2f1641794 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 6 Jul 2017 18:25:22 -0300 Subject: [PATCH] Add https to share option If both --secure and --share option are given, the return link of the url image to share will be https, not http. --- speedtest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/speedtest.py b/speedtest.py index 8b8526a..d363bc2 100755 --- a/speedtest.py +++ b/speedtest.py @@ -1486,8 +1486,10 @@ def shell(): print_(results.json()) if args.share and not machine_format: - printer('Share results: %s' % results.share()) - + if args.secure: + printer('Share results: %s' % results.share().replace("http","https")) + else: + printer('Share results: %s' % results.share()) def main(): try: