1234567891011121314151617181920212223242526272829303132 |
- #!/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 = ''
- def parseUid(self, etk):
- 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):
- return uid
- else:
- return False
|