byroot / pysrt

Python parser for SubRip (srt) files
GNU General Public License v3.0
451 stars 69 forks source link

pysrt.open() returns empty list #86

Open HappyNinja2 opened 3 years ago

HappyNinja2 commented 3 years ago

I downloaded a sample subtitle from OpenSutitle but when I run the following code, it just returns an empty list:

    result = chardet.detect(rawdata)
    charenc = result['encoding']
     subs = pysrt.open(file_path, encoding=charenc)

The code works for some subtitles but for some it just returns an empty list.

I have attached the subtitle with the problem (renamed the extension to *.txt, so it could be uploaded to github)

1951678632.txt