MythTV master
youtube_data.py
Go to the documentation of this file.
1# -*- coding: utf-8 -*-
2
3from string import ascii_uppercase, ascii_lowercase
4
5class getData(object):
6 def __init__(self):
7 self.a = '4e566d6e466c50784b416e477a527176587337444b5730554530324e4d39706d6774535531614c'
8
9 def update(self, data):
10 total = []
11 for char in bytes.fromhex(data).decode('ascii'):
12 if char in ascii_uppercase:
13 index = (ascii_uppercase.find(char) + 13) % 26
14 total.append(ascii_uppercase[index])
15 elif char in ascii_lowercase:
16 index = (ascii_lowercase.find(char) + 13) % 26
17 total.append(ascii_lowercase[index])
18 else:
19 total.append(char)
20 return "".join(total)