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.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...