Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

properly allow unicode parameters #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions vocabulary/vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def __get_api_link(api):
:returns: returns API links to urbandictionary, wordnik, glosbe, bighugelabs
"""
api_name2links = {
"wordnik": "http://api.wordnik.com/v4/word.json/{word}/{action}?api_key=1e940957819058fe3ec7c59d43c09504b400110db7faa0509",
"glosbe": "https://glosbe.com/gapi/translate?from={source_lang}&dest={dest_lang}&format=json&pretty=true&phrase={word}",
"urbandict": "http://api.urbandictionary.com/v0/{action}?term={word}",
"bighugelabs": "http://words.bighugelabs.com/api/2/eb4e57bb2c34032da68dfeb3a0578b68/{word}/json"
"wordnik": u"http://api.wordnik.com/v4/word.json/{word}/{action}?api_key=1e940957819058fe3ec7c59d43c09504b400110db7faa0509",
"glosbe": u"https://glosbe.com/gapi/translate?from={source_lang}&dest={dest_lang}&format=json&pretty=true&phrase={word}",
"urbandict": u"http://api.urbandictionary.com/v0/{action}?term={word}",
"bighugelabs": u"http://words.bighugelabs.com/api/2/eb4e57bb2c34032da68dfeb3a0578b68/{word}/json"
}

if api in api_name2links.keys():
Expand Down