From 8f343863a9a719dfc883c6328ea50bb78d376a82 Mon Sep 17 00:00:00 2001 From: bahmangm Date: Thu, 19 Mar 2020 21:03:47 +0330 Subject: [PATCH] Adding ["url"] to the line 48 of pyshorteners/shorteners/cuttly.py to solve to solve issue #150 (#151) --- pyshorteners/shorteners/cuttly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyshorteners/shorteners/cuttly.py b/pyshorteners/shorteners/cuttly.py index 12fe54d..20c5e43 100644 --- a/pyshorteners/shorteners/cuttly.py +++ b/pyshorteners/shorteners/cuttly.py @@ -45,7 +45,7 @@ def short(self, url): "API response is invalid ,could not be decoded" ) - status = response.json()["status"] + status = response.json()["url"]["status"] if status == self.STATUS_INVALID: """According to the API Docs when a status code of 4 is returned with json an Invalid API Key is provided"""