def handle_response(response):
    """Urllib returns different types in Python 2 and 3 (str vs bytes)"""
    if isinstance(response, str):
        return response
    else:
        return response.decode('utf-8')