add a try/except for older versions of requests

they have response.json as a dict instead of response.json()