| 123456789101112131415161718192021222324252627282930313233343536 | 
							- #!/usr/bin/env python3  
 
- # -*- coding: utf-8 -*-  
 
- """
 
- @Copyright (C) ansjer cop Video Technology Co.,Ltd.All rights reserved.
 
- @AUTHOR: ASJRD018
 
- @NAME: AnsjerFormal
 
- @software: PyCharm
 
- @DATE: 2019/6/1 17:25
 
- @Version: python3.6
 
- @MODIFY DECORD:ansjer dev
 
- @file: ETkObject.py
 
- @Contact: chanjunkai@163.com
 
- """
 
- import base64
 
- import urllib.parse
 
- class ETkObject(object):
 
-     def __init__(self, etk):
 
-         self.uid = ''
 
-         self.parseUid(etk)
 
-     def parseUid(self, etk):
 
-         try:
 
-             c = base64.b64decode(etk)
 
-             c = c[2:-2]
 
-             c = urllib.parse.unquote(c.decode('utf-8'))
 
-             c = base64.b64decode(c)
 
-             uid = c.decode('utf-8')
 
-             if len(uid) == 20:
 
-                 self.uid = uid
 
-         except Exception as e:
 
-             print(repr(e))
 
 
  |