From f7bfa49ff59d0e28236a1b5f087183ac2d50d382 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 1 May 2021 13:58:24 +0800 Subject: [PATCH] bug: correct missing Chinese pronunciation div For Chinese entries, pronunciation div uses the class 'zhpron' --- wiktionaryparser/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiktionaryparser/core.py b/wiktionaryparser/core.py index 6497b23..807466a 100644 --- a/wiktionaryparser/core.py +++ b/wiktionaryparser/core.py @@ -144,7 +144,7 @@ def parse_pronunciations(self, word_contents): pronunciation_list = [] audio_links = [] pronunciation_text = [] - pronunciation_div_classes = ['mw-collapsible', 'vsSwitcher'] + pronunciation_div_classes = ['mw-collapsible', 'vsSwitcher', 'zhpron'] for pronunciation_index, pronunciation_id, _ in pronunciation_id_list: span_tag = self.soup.find_all('span', {'id': pronunciation_id})[0] list_tag = span_tag.parent