Skip to content

Commit

Permalink
fix: #854
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind committed Jul 30, 2024
1 parent 351b451 commit 6364086
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/services/bingdict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export default <TranslateTaskProcessor>async function (data) {
const phoneticText = doc.querySelectorAll(".hd_area .b_primtxt");
data.audio = mp3s.map((a: Element, i: number) => ({
text: phoneticText[i].innerHTML.replace("&nbsp;", " "),
url: (a.getAttribute("onclick")?.match(/https?:\/\/\S+\.mp3/g) || [""])[0],
url: (a.getAttribute("data-mp3link")?.match(/https?:\/\/\S+\.mp3/g) || [
"",
])[0],
}));

try {
Expand Down

0 comments on commit 6364086

Please sign in to comment.