A concept function for hashing a show item.

This commit is contained in:
2017-09-28 13:44:09 +02:00
parent bbb20af93a
commit c045b15786

15
seasonedParser/tvdb.py Normal file
View File

@@ -0,0 +1,15 @@
import tvdb_api, hashlib
def main():
t = tvdb_api.Tvdb()
show = 'Rick and morty'.lower()
season = 3
for ep in range(1,10):
episode = t[show][season][ep]
itemConcat = '.'.join([show, str(season), str(ep)])
hash_object = hashlib.sha1(str.encode(itemConcat))
hex_dig = hash_object.hexdigest()
print('%s : %s' % (hex_dig, itemConcat))
if __name__ == '__main__':
main()