def __init__(self, request = {}, auth = 0): mac = get_mac() if mac is None: raise Exception("Can not get your box mac") self.__boxid = "%x" % mac self.__request['boxid'] = self.__boxid self.__GetUserAgent() self.__GetLanguage() self.__request = dict(request, **self.__request) self.__response = '' if auth == 1: self.AddAuth()
def getBoxKey(): return "%x" % boxwrapper.get_mac()