From d8bfedc30ac24b71def8dec828697db04534299b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Wed, 18 Dec 2019 13:27:46 -0300 Subject: [PATCH] [wgem] returning the app name as the domain when the there are several words in the title --- bauh/gems/web/controller.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index c0d7bf9d..09720843 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -84,7 +84,12 @@ class WebApplicationManager(SoftwareManager): name = url_no_protocol.split('.')[0].strip() if name: - name = RE_SYMBOLS_SPLIT.split(name)[0].strip() + name_split = [token for token in RE_SYMBOLS_SPLIT.split(name) if token] + + if len(name_split) == 1: + name = name_split[0].strip() + else: + name = url_no_protocol return name