Closed data-flux closed 6 months ago
The v6 version with the new opensubtitles.com
always download subtitles in UTF8 encoded format, and the code you mention is not in the script anymore.
Feel free to reopen an issue if similar problems (related to subtitles encoding) are found with the new provider.
If the SubEncoding is given as "Unknown" (I suppose this happens if OpenSubtitles does not have the correct metadata? Happened for me with Flight of the Conchords S01E02) then a LookupError will be thrown by:
decodedStr = str(decompressed, subEncoding, 'replace')
I fixed it with the
chardet
library:But this adds another dependency and might not be ideal.
I do have
opt_force_utf8
set, but this does not seem to make a difference.