Jump to content

Urban Dictionary

Recommended Posts

Good stuff. An Urban Dictionary workflow is a must-have.


I've submitted a PR to fix URL encoding (so multi-word queries work) and text encoding (so non-ASCII queries work).


Something I suspect you've missed is that json returns and expects unicode objects, not str, and Alfred Workflow always gives you unicode strings unless you've specifically requested bytes from web.py.


This line is key.

You've encoded the up/down signs in order to add them to that str, but result['word'] is unicode because it comes from the json API, so the workflow won't work if that's non-ASCII. title must be a unicode string.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...