You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Words with spaces don't get a valid definition. For example, "top hat" is a valid word, and is defined properly when searched using the API used. See the video below, for where I replace the space with "%20", which should stop the rest of the code treating the words separately. https://youtu.be/SpDVrNVwhV0
I'll be honest - I have no idea where in the code you treat the words differently - maybe in query_word = jsonpath_ng.parse('[0].word[*]')? The 0 could relate to the first word only? I'm not sure that's the case, since not even the definition for "top" is returned.
Anyway, my proposed fix (which isn't tested enough for a pull request) is to put the line name = name.replace(" ", "%20") somewhere at the top of the defn function.
The text was updated successfully, but these errors were encountered:
Words with spaces don't get a valid definition. For example, "top hat" is a valid word, and is defined properly when searched using the API used. See the video below, for where I replace the space with "%20", which should stop the rest of the code treating the words separately.
https://youtu.be/SpDVrNVwhV0
I'll be honest - I have no idea where in the code you treat the words differently - maybe in
query_word = jsonpath_ng.parse('[0].word[*]')
? The 0 could relate to the first word only? I'm not sure that's the case, since not even the definition for "top" is returned.Anyway, my proposed fix (which isn't tested enough for a pull request) is to put the line
name = name.replace(" ", "%20")
somewhere at the top of thedefn
function.The text was updated successfully, but these errors were encountered: