m-rtin / anki-ipa

Anki add-on to insert IPA transcriptions
https://ankiweb.net/shared/info/799647424
GNU Affero General Public License v3.0
19 stars 12 forks source link

[ger] Alternative IPA transcriptions #48

Open Donterioo opened 2 years ago

Donterioo commented 2 years ago

Currently the script scrapes only the first transcription (at least when using the German version)

For wenig I get only ˈveːnɪç

However, wiktionary often contains more than one relevant transcription. Recomended output is ˈveːnɪç|ˈveːnɪk

LeidiFlores commented 1 year ago

hi! for wenig on the API response, we get

===Pronunciation===\n* {{IPA|de|/ˈveːnɪç/}}\n* {{audio|de|De-wenig.ogg|audio}}\n*

used curl

curl --location --request GET 'https://en.wiktionary.org/w/api.php?action=parse&page=wenig&format=json&prop=wikitext' \
--header 'Content-Type: application/json' \
--header 'Cookie: GeoIP=MX:CMX:Mexico_City:19.43:-99.13:v4; WMF-Last-Access-Global=23-Oct-2022; WMF-Last-Access=23-Oct-2022' \
--data-raw '{
    "action": "parse", 
    "page": "word", 
    "format": "json", 
    "prop": "wikitext"
}'

do you have another example?