Closed rlemon closed 8 years ago
It's an intermittent problem with Urban Dictionary's API. Currently, this query is ended with:
[snip] "example":"Jessica really educated me on the concept of white privilege after she got arrested for protesting the gentrification of Harlem. She's a real SJW.","thumbs_down":4211}],"sounds":["http://wav.urbandictionary.com/sjw-23586.wav","http://wav.urbandictionary.com/sjw-34397.wav","http://wav.urbandictionary.com/sjw-39821.wa
They seemed to mishandle the callback and snip the output. Remove the callback
parameter and it's fine. I've sent them the following message:
Hello! I'm a developer using your API in one of my client-side programs. First of all, thanks a bunch for it, it's been a great source of fun for me and my users.
Lately though the JSONP output appears to be snipped, for example: http://api.urbandictionary.com/v0/define?term=sjw&callback=foo
Currently ends with [...] "http://wav.urbandictionary.com/sjw-39821.wa
No string delimiter, no curly brace to match the outer object. That means the request fails and users don't see their amusing definitions, which might one day cause an uprise and they'll beat me to a pulp.
I don't want to be beaten to a pulp!
Thank you for your time.
Hopefully they'll answer and you won't kill me.
So this seems to work now. Yay!
run !!urban poop and bot "returns" this: