def get_content_length(requests_response):
    """Extract content length from response headers. Returns None if no Content-Length header"""
    try:
        length = requests_response.headers['Content-Length']
        return int(length)
    except KeyError:
        return None