import hashlib
import pickle


def get_hash(u):
    """Returns the hash of a url_dict."""
    to_hash = [u["req_url"], u["site"], u["real_site"], u["cookies"], u["req_method"], u["resp_code"], u["resp_version"]]
    return hashlib.sha1(pickle.dumps(to_hash)).hexdigest()