aop_signature

https://github.com/ketu/openplaza/blob/master/apis/aliexpress.py

def get_aop_signature(url,is_auth = False):

        """_aop_signature"""

        parsed_url = urlparse(url)
        parsed_query = parse_qs(parsed_url.query)
        parsed_query_string = ""
        for k in sorted(parsed_query):
            parsed_query_string += k+ parsed_query[k][0]
        url_path = ""
        if not is_auth :
            url_path = parsed_url.path.replace("/openapi/","")
            print(url_path)

            #url_path = urlunparse((parsed_url.scheme,parsed_url.netloc,parsed_url.path,None,None,None))
            #print(url_path)

        salt = url_path + parsed_query_string
        #print(salt)
        h = hmac.new("1kQ00Y3wgg", salt, hashlib.sha1)
        s = h.digest().encode('hex')
        aop_signature = s.upper()