# -*- coding: utf-8 -*- from __future__ import absolute_import from datetime import datetime import hashlib import os import re import struct from six.moves import range def hash_opensubtitles(video_path): """Compute a hash using OpenSubtitles' algorithm. :param str video_path: path of the video. :return: the hash. :rtype: str """ bytesize = struct.calcsize(b'