Esempio n. 1
0
    def fingerprint(self):
        """
        request唯一表识
        @return:
        """
        url = self.__dict__.get("url", "")
        # url 归一化
        url = tools.canonicalize_url(url)
        args = [url]

        for arg in ["params", "data", "files", "auth", "cert", "json"]:
            if self.requests_kwargs.get(arg):
                args.append(self.requests_kwargs.get(arg))

        return tools.get_md5(*args)
Esempio n. 2
0
    def fingerprint(self):
        """
        request唯一表识
        @return:
        """
        url = self.__dict__.get("url", "")
        # url 归一化
        url = tools.canonicalize_url(url)

        args = [url]
        params = self.requests_kwargs.get("params")
        datas = self.requests_kwargs.get("data")
        if params:
            args.append(str(params))

        if datas:
            args.append(str(datas))
        return tools.get_md5(*args)