Skip to content

Instantly share code, notes, and snippets.

Last active April 29, 2016 18:29
What would you like to do?
request_url = "{}".format( input['article_url'] )
yourls_response = requests.get(request_url)
if yourls_response.status_code != 200:
status = "fail"
data = yourls_response.json()
shorturl = data["shorturl"]
return {
'shorturl': shorturl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment