Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Words with spaces don't work #4

Open
H4KKR opened this issue Apr 9, 2021 · 0 comments
Open

Words with spaces don't work #4

H4KKR opened this issue Apr 9, 2021 · 0 comments

Comments

@H4KKR
Copy link

H4KKR commented Apr 9, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant