From a810b5a06f6f0b6878eab9af97dd1854016e316e Mon Sep 17 00:00:00 2001 From: yu7777 Date: Fri, 8 Nov 2019 16:49:31 +1100 Subject: [PATCH] Update lgmcw_freq.py --- addons21/fastwq/service/dict/lgmcw_freq.py | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/addons21/fastwq/service/dict/lgmcw_freq.py b/addons21/fastwq/service/dict/lgmcw_freq.py index b792769..f444043 100644 --- a/addons21/fastwq/service/dict/lgmcw_freq.py +++ b/addons21/fastwq/service/dict/lgmcw_freq.py @@ -28,13 +28,23 @@ class lgmcw_Sound(MdxService): def title(self): return getattr(self, '__register_label__', self.unique) - - + def get_html_all(self): + html = self.get_html() + if not html: + self.word = self.word.lower() + html = self.get_html() + if not html: + self.word = self.word.capitalize() + html = self.get_html() + if not html: + self.word = self.word.upper() + html = self.get_html() + return html @export('BNC_freq') def bnc_freq(self): - html = self.get_html() + html = self.get_html_all() if html: freq = re.search(r'(.*?)', html) if freq: @@ -43,8 +53,9 @@ class lgmcw_Sound(MdxService): @export('IWEB_freq') def iweb_freq(self): - html = self.get_html() + html = self.get_html_all() if html: + print(html) freq = re.search(r'(.*?)', html) if freq: return freq[1].strip() @@ -52,7 +63,7 @@ class lgmcw_Sound(MdxService): @export('ECO_freq') def eco_freq(self): - html = self.get_html() + html = self.get_html_all() if html: freq = re.search(r'(.*?)', html) if freq: @@ -61,7 +72,7 @@ class lgmcw_Sound(MdxService): @export('COCA_freq') def coca_freq(self): - html = self.get_html() + html = self.get_html_all() if html: freq = re.search(r'(.*?)', html) if freq: