WiktionaryParser icon indicating copy to clipboard operation
WiktionaryParser copied to clipboard

Missing pronunciations in Chinese

Open claw89 opened this issue 4 years ago • 1 comments

Links to pronunciation audio files are not returned when searching for Chinese words (using Han characters). For example the following code:

word = parser.fetch('朋友', 'chinese')
for item in word:
    print(item['pronunciations'])

returns

{'text': ['朋友\n', '朋友\n'], 'audio': []}

This appears to be because pronunciations for Chinese words are placed inside

<div class="vsSwitcher" data-toggle-category="pronunciations"></div>

whereas those for English are in

<table class="audiotable"></table>

This may be related to #9

claw89 avatar Jan 20 '21 08:01 claw89

@claw89 thank you for pointing this out and debugging! I'm not working on this parser atm so can't really fix this right now but, a pull request for this would be helpful

suyashb95 avatar Jan 29 '21 10:01 suyashb95