diff --git a/addons/fastwq/service/dict/bing.py b/addons/fastwq/service/dict/bing.py index a4609f1..4394b3b 100644 --- a/addons/fastwq/service/dict/bing.py +++ b/addons/fastwq/service/dict/bing.py @@ -81,7 +81,8 @@ class Bing(WebService): return seg.get('BrE', u'') if seg else u'' def _fld_mp3(self, fld): - audio_url = self._get_field('pronunciation')[fld] + seg = self._get_field('pronunciation') + audio_url = seg[fld] if seg else u'' if bing_download_mp3 and audio_url: filename = get_hex_name('bing', audio_url, 'mp3') if os.path.exists(filename) or self.net_download(filename, audio_url): diff --git a/addons/fastwq/service/dict/bing3tp.py b/addons/fastwq/service/dict/bing3tp.py index ba80b3d..8af015b 100644 --- a/addons/fastwq/service/dict/bing3tp.py +++ b/addons/fastwq/service/dict/bing3tp.py @@ -40,7 +40,8 @@ class BingXtk(WebService): return seg.get('BrE', u'') if seg else u'' def _fld_mp3(self, fld): - audio_url = self._get_field('pronunciation')[fld] + seg = self._get_field('pronunciation') + audio_url = seg[fld] if seg else u'' if bing_download_mp3 and audio_url: filename = get_hex_name('bing', audio_url, 'mp3') if os.path.exists(filename) or self.net_download(filename, audio_url): diff --git a/addons21/fastwq/service/dict/bing.py b/addons21/fastwq/service/dict/bing.py index 4a0bd98..2752d04 100644 --- a/addons21/fastwq/service/dict/bing.py +++ b/addons21/fastwq/service/dict/bing.py @@ -81,7 +81,8 @@ class Bing(WebService): return seg.get('BrE', u'') if seg else u'' def _fld_mp3(self, fld): - audio_url = self._get_field('pronunciation')[fld] + seg = self._get_field('pronunciation') + audio_url = seg[fld] if seg else u'' if bing_download_mp3 and audio_url: filename = get_hex_name('bing', audio_url, 'mp3') if os.path.exists(filename) or self.net_download(filename, audio_url): diff --git a/addons21/fastwq/service/dict/bing3tp.py b/addons21/fastwq/service/dict/bing3tp.py index ba80b3d..8af015b 100644 --- a/addons21/fastwq/service/dict/bing3tp.py +++ b/addons21/fastwq/service/dict/bing3tp.py @@ -40,7 +40,8 @@ class BingXtk(WebService): return seg.get('BrE', u'') if seg else u'' def _fld_mp3(self, fld): - audio_url = self._get_field('pronunciation')[fld] + seg = self._get_field('pronunciation') + audio_url = seg[fld] if seg else u'' if bing_download_mp3 and audio_url: filename = get_hex_name('bing', audio_url, 'mp3') if os.path.exists(filename) or self.net_download(filename, audio_url):