bazarr
bazarr copied to clipboard
cannot download subtitle from Subs4Free
Describe the bug There has been earlier reports about this provider -mostly in connection with finding results. However this time the problem is parsing the subtitle and processed by bazarr. The problem is evident on the log file at line 790 :
05/02/2022 16:19:08|ERROR |subzero.modification.main |Couldn't load subtitle: Traceback (most recent call last): File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 51, in load self.f = pysubs2.SSAFile.from_string(content) File "/opt/bazarr/bazarr/../libs/pysubs2/ssafile.py", line 133, in from_string return cls.from_file(fp, format_, fps=fps, **kwargs) File "/opt/bazarr/bazarr/../libs/pysubs2/ssafile.py", line 160, in from_file format_ = autodetect_format(fragment) File "/opt/bazarr/bazarr/../libs/pysubs2/formats.py", line 78, in autodetect_format raise FormatAutodetectionError("No suitable formats")pysubs2.exceptions.FormatAutodetectionError: No suitable formats|Traceback (most recent call last): File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 51, in load self.f = pysubs2.SSAFile.from_string(content) File "/opt/bazarr/bazarr/../libs/pysubs2/ssafile.py", line 133, in from_string return cls.from_file(fp, format_, fps=fps, **kwargs) File "/opt/bazarr/bazarr/../libs/pysubs2/ssafile.py", line 160, in from_file format_ = autodetect_format(fragment) File "/opt/bazarr/bazarr/../libs/pysubs2/formats.py", line 78, in autodetect_format raise FormatAutodetectionError("No suitable formats")pysubs2.exceptions.FormatAutodetectionError: No suitable formats|
05/02/2022 16:19:08|ERROR |subliminal_patch.core |Something went wrong when getting modified subtitle for <Subs4FreeSubtitle 'https://www.subs4free.info/search_report.php?search=venom let there be carnage 2021&searchType=1' [el:utf-8]>|
Can it be that the downloaded file is a zip file while bazarr expects a subtitle file format?
To Reproduce Steps to reproduce the behavior:
- Search for subtitle in Subs4Free
- Attempt to download the subtitle
- subtitle is not parsed
Expected behavior subtitle downloaded , extracted from zip and processed by bazarr
Software (please complete the following information):
- Bazarr: [v 1.0.2]
- OS: [Ubuntu 20]
Additional context
- Subtitle provider: Subs4Free bazarr_subs4free_error.log
If you disable the automatic mode, does it works? This provider should handle rar and zip file properly. I've downloaded this subtitles and it looks fine to me. Not sure what's going wrong here.
after some troubleshooting I came to the conclusion that the problem is not with downloading but with post-processing : The only possible post-processing is "Encode Subtitles to UTF8". When any other option is checked, the subtitle is not parsed. (this affects only this provider. Any other provider for greek subs is working fine with the rest of options enabled -very strange.
I jumped into false conclusions. The subtitle is not properly parsed when UTF8 is enabled . It just creates an empty srt file :(
Could you provide a new debug log?
operation starts at line 960. I don't upload the downloaded srt as it is an empty text. bazarr.log 0
Ok I've tried for the last 3 days to fix the download_subtitles function for this provider. They implemented some cloudflare protection and this cause redirect to happens with incomplete cookies that trigger another redirect to the movies page. I can't get over it and, for now, Ive lost my appetite to beat them on that. If someone else is interested to jump in and fix it, it would be nice.
Thanks for the help and investigation. A few things worth trying: change the domain to https://www.subs4free.club/ (.club instead of .info) give the option to provide credentials -hopefully the cloudflare protection will be less strict when logged in).
changing the domain to https://www.subs4free.club/ didn't help at all. hopefully you can implement credentials (user/pass) for this provider and hope for the best :)
I have a workaround locally for a different subtitle provider (zimuku). Zimuku is protected by cloudflare too. The first request returns 404 with a javascript in the response. Normal web-browser will execute it regardless of the 404 code.
This is working locally in my setup: https://github.com/sinofool/bazarr/commit/72571b1472937974c1c9c0827f05a4ec8cc292ca
I am using an external container from browserless/chrome and pyppeteer library.
The HTTP requests will be executed by a real chrome browser, instead of python requests library.
This approach should be working with other providers with cloudflare protection too. It will be better to have a global configuration for all providers taking the detour.