示例#1
0
class Subtitle(XmlModel):
    def __init__(self, node):
        super(Subtitle, self).__init__(node)
        self._decrypter = SubtitleDecrypter()

    def decrypt(self):
        return StyledSubtitle(self._decrypter.decrypt(
            self._decrypter._build_encryption_key(int(self.id)),
            self['iv'][0].text.decode('base64'),
            self['data'][0].text.decode('base64')))
示例#2
0
class Subtitle(XmlModel):
    def __init__(self, node):
        super(Subtitle, self).__init__(node)
        self._decrypter = SubtitleDecrypter()

    def decrypt(self):
        return StyledSubtitle(self._decrypter.decrypt(
            self._decrypter._build_encryption_key(int(self.id)),
            base64.b64decode(self['iv'][0].text),
            base64.b64decode(self['data'][0].text)))
示例#3
0
 def __init__(self, node):
     super(Subtitle, self).__init__(node)
     self._decrypter = SubtitleDecrypter()
示例#4
0
 def __init__(self, node):
     super(Subtitle, self).__init__(node)
     self._decrypter = SubtitleDecrypter()