# OALD 10 + Collocation (Trail) (Update 2)

**URL:** <https://forum.freemdict.com/t/topic/43469>\
**Category:** 技术交流与词典编修\
**Created:** [2026 年3 月 27 日 14:35 UTC](https://forum.freemdict.com/t/topic/43469 "2026-03-27T14:35:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 27 日 14:35 UTC](https://forum.freemdict.com/t/topic/43469/1 "2026-03-27T14:35:35Z")

</div>

![z1](https://forumcdn.freemdict.com/uploads/default/original/3X/7/4/74d35407dee7b2ecb639fffc1245a2a02bef8773.png)  
 ![z2](https://forumcdn.freemdict.com/uploads/default/original/3X/a/4/a4772044a5e2abe3bfbd2b3e0bddbc4b108a488f.png)

Hello back folks. Wishing everyone a happy evening/morning.

I am in process of making OALD + Collocation (maybe a thesaurus in future as well)  
I have worked on OALD10 thus far. Have purchased a license fo collocation dictionray from official. I wll then add to this dictionray as well.

Right now i am stuck with js file. I plays the US pronunciation. But no audio on UK. I have js/css files along with trial dictionay. I am providing my packer python script. Someone here articualte in programming can have a look and see what is causing the issue. I will upload the content in short time. Kindly help me sort out this issue so that the whole community can be benefited from this product.

Anyone will to help reach me in PM/DM so i can provide the project files to sort this issue. TY

link update to v2:

> **[百度网盘 请输入提取码](https://pan.baidu.com/share/init?surl=KGENRC7ay_h7D1rWcORRIg&pwd=2226)**
>
> 百度网盘为您提供文件的网络备份、同步和分享服务。空间大、速度快、安全稳固，支持教育网加速，支持手机端。注册使用百度网盘即可享受免费存储空间

---

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 27 日 15:24 UTC](https://forum.freemdict.com/t/topic/43469/2 "2026-03-27T15:24:06Z")

</div>

So the dictionray cannot play UK/GB/BrE sound  
but plays US/NAmE  
with provided js/css

---

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 28 日 03:20 UTC](https://forum.freemdict.com/t/topic/43469/3 "2026-03-28T03:20:03Z")

</div>

Link update to v2.  
provided collocation dictionary inclusion.  
Collocation enteries go with suffix \_cl  
Can be opened directly form collocation box under OADL10 enteries

---

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 28 日 17:41 UTC](https://forum.freemdict.com/t/topic/43469/4 "2026-03-28T17:41:16Z")

</div>

link v3

HTML with working CSS/JS:

> **[百度网盘 请输入提取码](https://pan.baidu.com/share/init?surl=bhlKW2_7W9ofiemHwsJMNQ&pwd=html)**
>
> 百度网盘为您提供文件的网络备份、同步和分享服务。空间大、速度快、安全稳固，支持教育网加速，支持手机端。注册使用百度网盘即可享受免费存储空间

Here i have packed my html with js and css packed with html files.  
The css/js works fine when placed next to the html files. It perfectly plays audio and does other function. However when i packed it with this python packer it somehow breaks the audio pronunciation.

The Version 2 link use a different js which strangely works only on US audio. No BrE/UK/GB audio is played.

I will continue finishing the scrapping and then publish the dictionary anyway with limited functionality. Until someone comes to the rescue. 😅

---

<div class="post-metadata">

**Author:** ![cdmaer](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@cdmaer](https://forum.freemdict.com/u/cdmaer)\
**Post date:** [2026 年3 月 29 日 01:25 UTC](https://forum.freemdict.com/t/topic/43469/5 "2026-03-29T01:25:41Z")

</div>

I debugged your OALD10.js script and found that the buildCdnUrl function doesn’t work properly. When the function works with ‘audio/gb/zumba\_1\_gb\_1.mp3’, it returns a wrong url:  
‘[https://www.oxfordlearnersdictionaries.com/media/english/gb\_pron/z/zum/zumba/zumba\_1\_gb\_2.mp3](https://www.oxfordlearnersdictionaries.com/media/english/gb_pron/z/zum/zumba/zumba_1_gb_2.mp3)’

The right url must be:  
‘[https://www.oxfordlearnersdictionaries.com/media/english/uk\_pron/z/zum/zumba/zumba\_1\_gb\_2.mp3](https://www.oxfordlearnersdictionaries.com/media/english/uk_pron/z/zum/zumba/zumba_1_gb_2.mp3)’

Plus, there are typos or errors with some of the html pages from the dictionary website. You’d better remove these typos/errors and downsize the package by sanitizing all pages with BeautifulSoup.

---

<div class="post-metadata">

**Author:** ![cdmaer](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@cdmaer](https://forum.freemdict.com/u/cdmaer)\
**Post date:** [2026 年3 月 29 日 01:42 UTC](https://forum.freemdict.com/t/topic/43469/6 "2026-03-29T01:42:43Z")

</div>

You can replace the line

var pron = m[1] + ‘\_pron’; // “gb” → “gb\_pron”

with

var pron=m[1]==‘us’?‘us\_pron’:‘uk\_pron’;

---

<div class="post-metadata">

**Author:** ![xuhuaq](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/eada6e/32.png) [@xuhuaq](https://forum.freemdict.com/u/xuhuaq)\
**Post date:** [2026 年3 月 29 日 01:57 UTC](https://forum.freemdict.com/t/topic/43469/7 "2026-03-29T01:57:18Z")

</div>

[fix\_all\_audio.py](https://forum.freemdict.com/uploads/short-url/ed5rvHNccFfV29IiiwP32PcO7tc.py) (3.4 KB)

最关键的是html中音源url的处理：

从

```auto
<div class="sound audio_play_button pron-uk icon-audio" data-audio-src="audio/gb/zodiac __gb_1.mp3" data-sound="sound://audio/gb/zodiac__ gb_1.mp3" title="zodiac pronunciation English">

```

替换为

```auto
<a class="sound audio_play_button pron-uk icon-audio" href="sound://audio/gb/zodiac__gb_1.mp3" title="zodiac pronunciation English"></a>

```

然后用楼主的python脚本转换为mdx和mdd。

经测试，不用js脚本，在windows平台三个词典软件下都能正常播放。

GoldenDict-ng 26.4.0  
Eudic欧路词典26.2.0  
MDictPC-2.0.12

下一贴附测试结果。

---

<div class="post-metadata">

**Author:** ![xuhuaq](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/eada6e/32.png) [@xuhuaq](https://forum.freemdict.com/u/xuhuaq)\
**Post date:** [2026 年3 月 29 日 02:06 UTC](https://forum.freemdict.com/t/topic/43469/8 "2026-03-29T02:06:19Z")

</div>

同样一套mdx mdd，三个词典软件对音源url 正反斜杠 的处理（测试时只加载一部词典、不加载任何js）：

```auto
sound://协议，a链接，反斜杠：
<a class="sound audio_play_button pron-us icon-audio" href="sound://\audio\us\zoo__us_1.mp3" title="zoo pronunciation American"></a>

转换为mdd测试：
GoldenDict-ng 26.4.0如下（可以播放）
<a class="sound audio_play_button pron-us icon-audio" href="gdau://14d9781360c308797f91e4274af2adc6/\audio\us\zoo__us_1.mp3" onclick="return false;" title="zoo pronunciation American"></a>
					

Eudic欧路词典26.2.0如下（可以播放）
<a class="sound audio_play_button pron-us icon-audio" href="sound://\audio\us\zoo__us_1.mp3" title="zoo pronunciation American"></a>
					

MDictPC-2.0.12 中如下（不能播放）
<a class="sound audio_play_button pron-us icon-audio" href="mdx://mdict.cn/sound/20859770/\audio\us\zoo__us_1.mp3" title="zoo pronunciation American"></a>
					
					
sound://协议，a链接，修改为正斜杠后（sound://audio、sound:///）：
 <a class="sound audio_play_button pron-uk icon-audio" href="sound://audio/gb/zoo__gb_1.mp3" title="zoo pronunciation English"></a>

 <a class="sound audio_play_button pron-us icon-audio" href="sound:///audio/us/zoo__us_1.mp3" title="zoo pronunciation American"></a>

再转换为mdd测试：
MDictPC-2.0.12 中变为如下（可以播放）
 <a class="sound audio_play_button pron-uk icon-audio" href="mdx://mdict.cn/sound/20859770/audio/gb/zoo__gb_1.mp3" title="zoo pronunciation English"></a>

 <a class="sound audio_play_button pron-us icon-audio" href="mdx://mdict.cn/sound/20859770//audio/us/zoo__us_1.mp3" title="zoo pronunciation American"></a>
					
GoldenDict-ng 26.4.0如下（可以播放）
<a class="sound audio_play_button pron-uk icon-audio" href="gdau://14d9781360c308797f91e4274af2adc6/audio/gb/zoo__gb_1.mp3" onclick="return false;" title="zoo pronunciation English"></a>
					
<a class="sound audio_play_button pron-us icon-audio" href="gdau://14d9781360c308797f91e4274af2adc6//audio/us/zoo__us_1.mp3" onclick="return false;" title="zoo pronunciation American"></a>
					
Eudic欧路词典26.2.0如下（可以播放）
<a class="sound audio_play_button pron-uk icon-audio" href="sound://audio/gb/zoo__gb_1.mp3" title="zoo pronunciation English"></a>
					
<a class="sound audio_play_button pron-us icon-audio" href="sound:///audio/us/zoo__us_1.mp3" title="zoo pronunciation American"></a>

```

兼容性：  
三个词典均支持 href="sound://  
mdict不支持反斜杠  
GoldenDict-ng和欧路词典对正反斜杠不挑剔；  
GoldenDict-ng会将 sound:// 转换为 gdau://  
欧路词典对 sound:// 原封不动

---

<div class="post-metadata">

**Author:** ![cdmaer](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@cdmaer](https://forum.freemdict.com/u/cdmaer)\
**Post date:** [2026 年3 月 29 日 02:07 UTC](https://forum.freemdict.com/t/topic/43469/9 "2026-03-29T02:07:24Z")

</div>

如果把音频文件放在mdd中，就需要做出这样的修改。

---

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 29 日 02:47 UTC](https://forum.freemdict.com/t/topic/43469/10 "2026-03-29T02:47:55Z")

</div>

Thanks a bunch my freind. It now works. Gratitude from the bottom of my heart ❤

---

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 29 日 02:48 UTC](https://forum.freemdict.com/t/topic/43469/11 "2026-03-29T02:48:59Z")

</div>

My gratitude my friend ❤

---

<div class="post-metadata">

**Author:** ![xuhuaq](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/eada6e/32.png) [@xuhuaq](https://forum.freemdict.com/u/xuhuaq)\
**Post date:** [2026 年3 月 29 日 03:23 UTC](https://forum.freemdict.com/t/topic/43469/12 "2026-03-29T03:23:42Z")

</div>

祝你的词典早日面世！任何从0开始的工作都了不起！ 👍

@cdmaer 的建议很不错

> sanitizing all pages with BeautifulSoup.

---

<div class="post-metadata">

**Author:** ![tempertemper](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/tempertemper/32/86703_2.png) [@tempertemper](https://forum.freemdict.com/u/tempertemper)\
**Post date:** [2026 年3 月 29 日 05:28 UTC](https://forum.freemdict.com/t/topic/43469/13 "2026-03-29T05:28:26Z")

</div>

I intend no delay. As soon as the work is finished, i am publishing this right away. 🫡  
This error was holding me at the bay. Now i have resumed working. I will def sanitize all pages to make it free from all the external/unwanted links 💯

---

<div class="post-metadata">

**Author:** ![xianjue114](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/a587f6/32.png) [@xianjue114](https://forum.freemdict.com/u/xianjue114)\
**Post date:** [2026 年3 月 30 日 00:31 UTC](https://forum.freemdict.com/t/topic/43469/14 "2026-03-30T00:31:37Z")

</div>

CD大大两年不见了啊……甚至想念。

---

<div class="post-metadata">

**Author:** ![cdmaer](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@cdmaer](https://forum.freemdict.com/u/cdmaer)\
**Post date:** [2026 年3 月 30 日 07:57 UTC](https://forum.freemdict.com/t/topic/43469/15 "2026-03-30T07:57:14Z")

</div>

Thanks for your remembering me all the way… I often linger over this forum.
