Merge pull request #5 from cottongin/patch-1

fixes urbandictionary api change
This commit is contained in:
reticulatingspline 2018-09-12 22:59:37 -04:00 committed by GitHub
commit 4a98295832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,9 @@ class UrbanDictionary(callbacks.Plugin):
return
# process json.
results = jsondata.get('result_type') # exact, no_results, fulltext .
if not results:
# assume exact i guess...
results = 'exact'
definitions = jsondata.get('list')
# prep output now depending on results.
if results == "exact": # we did not find anything.