def _hash_url(self, url):
        """
        Hash the URL to an md5sum.
        """

        if isinstance(url, six.text_type):
            url = url.encode('utf-8')

        return hashlib.md5(url).hexdigest()