From 9420b66570e3e7ff4979dfd424364ed3166165f1 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 17 Jul 2016 11:37:51 -0700 Subject: [PATCH] Fixups --- anki_connect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/anki_connect.py b/anki_connect.py index 5d910ab..ccf4a58 100644 --- a/anki_connect.py +++ b/anki_connect.py @@ -45,9 +45,9 @@ def audioBuildFilename(kana, kanji): def audioDownload(kana, kanji): - url = 'http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kana={}'.format(urllib2.quote(kana.encode('utf-8'))) - if kanji: - url += '&kanji={}'.format(urllib2.quote(kanji.encode('utf-8'))) + url = 'http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji={}'.format(urllib2.quote(kanji.encode('utf-8'))) + if kana: + url += '&kana={}'.format(urllib2.quote(kana.encode('utf-8'))) try: resp = urllib2.urlopen(url)